On 22 Aug 2009, at 22:34, Rodrigo Morante wrote:

> You mean, like this?

Yes, that sort of thing.


> The results are the same: Under Windows it works. Under Ubuntu with
> Compiz it works. Under Ubuntu, being tunneled to Windows (using Xming)
> it works. Under Ubuntu using the standard "Visual Appearance" (that
> is, no Compiz) it produces a black area if the window is partially
> occluded.

Hmm, not for me, at least not quite as you describe.
Testing with ubuntu-9.04 I see it working OK under gnome OK,  
regardless of compiz setting, it would appear.

Under xfce4 though, I do get the black rectangle, exactly as you  
describe.

This is testing with fltk-1.1.x from svn.
I wonder if it is a driver issue? The test box has an older nvidia  
card, and is using the nvidia proprietary driver. I wonder if that  
matters? What graphics/driver are you using in your tests?


> Using offscreens has no impact on the problem, I'm afraid. The
> documentation states that offscreens can be used anytime and not just
> inside the draw() method. However, if fl_read_image can only be used
> within the draw() method, subclassing is a must, I think. However,
> perhaps I'm missing something.

What you are missing is that fl_read_image() can only be used when  
the graphical context is fully know.
For an onscreen window, the easiest way to ensure that is only to  
call it from within the draw() method (although on most systems a  
window->make_current() will probably do the job OK too.)
For the offscreen, the context is fully known after you call the  
begin_offscreen, so you can (or at least *ought*) to be able to use  
fl_read_image() safely at that point.
Now I know how to produce the error (using xfce) I might try a few  
tests to see if I can see what happens - time permitting!
-- 
Ian




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

Reply via email to