> For the sake of argument lets say i want to fill a window area with > randomly sized & placed and randomly coloured rectangles.
You need to draw the entire scene, every time. This is "normal". So if you have multiple rectangles, then you need a data-structure that holds all of your rectangles; this structure would be a member of your subclassed "canvas" widget, and so is readily accessible to your draw method. Each time the draw method runs, the scene is cleared and redrawn. Now, it sounds like what you want to do is "incremental" drawing, that is the rectangles are drawn only one time, and persists through subsequent redraws. This is not the "normal" way to do things, but is possible. For this purpose, I would create an offscreen surface and draw (incrementally) into that, then have the widget's draw method simply blit the relevant portion of the offscreen surface onto the display on each redraw. Is that what you are trying to achieve? If so, I can probably post a worked example (indeed, I think I did a while back) showing exactly that. SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

