On 18/01/11 22:16, Ish wrote:
> Hi guys I am making a very simple graph widget. It has a window for a
> graph constructed by iterating through a vector of points and calling
> fl_line on two consecutive points.
>
> Additionally I have a text that indicates the coordinate i am pointed
> at and a cross that comes from the sides of the window meeting at its
> center, your current mouse position (event_x(), event_y())
>
> I call redraw every time I get the event FL_MOVE. My redraw draws the
> entire screen.
>
> My widget is very slow, and choppy.

If it were me, I'd probably render the graph just the one time, into an 
fl_offscreen, then blit that into the visible widget and draw the cursor 
graphic over it as thw mouse moved.

That ought to be "low cost" enough to do at a reasonable refresh rate 
with being too choppy.



_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to