On 14 Aug 2009, at 1:20, Rodrigo Morante wrote:

>     // Added from here...
>     fl_begin_offscreen(off);
>     win->make_current();
>     win->redraw();
>     Fl::check();
>     fl_end_offscreen();
>     // ...to here.

No, this isn't going to work - starting the offscreen then setting  
the window current is just going to switch the rendering context back  
to the window...

If you want to use the offscreen like this, you'll need to derive a  
subclass for your outer window, then in its draw() method override  
the rendering context to the offscreen.... It's a bit more work, but  
robust, and there have been worked examples of this posted in the  
lists recently you could refer to.

But for what you are describing, the offscreen is probably  
overkill... simply calling win->make_current() immediately before you  
call fl_read_image(...) should be enough to get it working. Does it  
not work?
-- 
Ian



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

Reply via email to