On 06/09/11 01:41, Li Ding wrote: > I am learning v1.3. I inherited a Fl_Widget, and put fl_rectf(0, 0, w(), h()) > in the virtual draw() method, but the rectangle was drawn on the top left
You should use instead:
fl_rectf(x(), y(), w(), h());
..and it will work as expected.
Coordinates are relative to the window, not to the widget.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

