On 13 Aug 2009, at 20:04, Rodrigo Morante wrote:
>
>    fl_read_image(buf, 0, 0, win->w(), win->h());


Actually, looking at this again, I don't think it is valid to call  
fl_read_image() at that point in your code, as you do not know what  
the current rendering context is...

You really ought to only call fl_read_image() in your widget's draw()  
method, as that is the only place you can be sure the graphics  
context is valid.

You can probably fake it in this case though, by calling

        win->make_current();

just immediately before you call fl_read_image() and all *should* be  
well. Probably... On most systems, most of the time...

Worth a try at any rate.
-- 
Ian



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

Reply via email to