> I call drawline() draw some lines in the window, but I found that
> if I call redraw() function to redraw the whole window, the lines
> I drawed before will be cleared. Why?

The redraw() call simply tells the system to call the widgets' draw()
functions at some convenient point in the event loop in the future.
The redraw() call does not do the actual drawing.

Do you call drawline() directly, or indirectly from the widget's
draw() member function? If you are calling drawline() outside draw()
it will never be called again unless you add special logic to do so.

The usual way to handle this is to derive your own class from an
existing FLTK class, and override the draw() member function to call
drawline() etc. as needed.

D.

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

Reply via email to