Hi, I'm creating a graphing application using ZedGraph, which uses GDI+. If a curve is overflowing past the chart, I wrap it around to the other side. I do this by clipping the chart and just redrawing the curve as many times as it needs to wrap.
for(int i=startShift; i<=endShift; i++);
{
g.TranslateTransform(chartWidth,0);
g.DrawCurve(...);
}
This works, but it's slow, and I think g.DrawCurve
is the culprit because it's running a spline interpolation algorithm everytime. Can I force it to only calculate once? Or do I need to draw the curve once to an offscreen buffer and just have the loop draw the buffer?
Thanks.