I have been having issues getting the draw() methods to do anything, I have 
seen sample code from Greg E and others and as it says below (from a Nano-X SDK 
article :

"There are only certain places you can execute drawing code in FLTK. Calling 
these functions at other places will result in undefined behavior!


The most common is inside the virtual method Fl_Widget::draw(). To write code 
here, you must subclass one of the existing Fl_Widget classes and implement 
your own version of draw()."

What are the other methods mentioned? I have seen the Widget one,
For learning purposes why does the fl_line or fl_rectf calls seem to
not do anything unless implemented in this widget fashion? Is the window
not interpreted as some kind of 'surface' and whichever is the 'current'
or 'pointed to' surface the call to fl_line say would be executed there?

It seems like it does not know about the active window(s)? I would
just like to populate an area with lots of coloured rectangles generated
on the fly, updated regularly, drawing filled rectangles seems a lot
faster than using fl_box for example, so i chose to try drawing
functions, but am not clear how it all goes together in FLTK.

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

Reply via email to