On 15 Aug 2009, at 20:43, Rodrigo Morante wrote:

> I recoded a bit, in particular I derived a class from
> Fl_Double_Window.

Yes, although I'd really suggest that you override the draw() method  
and do all the smarts in there - basically have it do the "ordinary"  
stuff usually, and the "special" stuff to save the image only when a  
capture is required.
I only suggest this because I have done this in the past and it  
worked well...

> Now the area of the main window which is covered by
> the Fl_File_Chooser when starting to save is dumped as a black region.

That sounds very odd - this doesn't make much sense, really, as the  
region that the file-chooser covered must surely be marked as  
damaged, so it seems odd that it doesn't redraw...?

> If the Fl_File_Chooser doesn't cover at all the window the dump is Ok.
> Using fl_begin_offscreen()/fl_end_offscreen() does not alter the
> result.

OK, now that is very strange - I have had problems in the past with  
grabbing images from the screen being elided by other windows, but  
that's the whole point of the offscreen, of course, it should only  
ever have the "wanted" drawing in it...

> I guess that a really quick-and-dirty solution would be to add
> a time delay before reading.

Maybe, but that should not be necessary. I think understanding why  
the offscreen doesn't do the Right Thing might be interesting too...



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

Reply via email to