On 02.05.2012 15:51, Edzard Egberts wrote:
> Matthias Melcher schrieb:
>>
>> On 02.05.2012, at 14:27, Edzard Egberts wrote:
>>> Is it a known problem, that offscreen drawing doesn't work for
>>> both screens of dual screen systems? I'm using Fedora 14, Kernel
>>> 2.6.35.14, GNOME 2.32.0
>>
>> No. I hear this for the first time. I wonder if this is related to
>> the FLTK screen_xywh() function calls, or if this is some feature of
>> the underlying OS. If you have a few minutes, could you try to set a
>> breakpoint in the screen_xywh functions and the retrieve the snapshop
>> again?
>
> It's not so easy, does it work for you, to test the functions? I called
> them inside of fl_offscreen and all looks okay.
I don't think that this has anything to do with the screen_xywh()
functions. You're calling:
Fl_Offscreen OF= fl_create_offscreen(1000, 1000);
fl_begin_offscreen(OF);
Fl_Window::draw(); // draws window off screen
fl_end_offscreen();
This creates a 1000x1000 pixel offscreen image and draws the window
contents into this image. However, your window has its own x/y
coordinates (based on its position on your workstation), and hence
all drawings are "translated" by these x/y coordinates. If your window
happens to be more than 1000 pixels shifted to the right or bottom,
nothing will be drawn /inside/ your offscreen image.
Set your image x/y coordinates to (0,0) before drawing into the
offscreen (and back after drawing), and everything will be okay.
The same would happen when drawing /any/ widget into an offscreen,
but then translated by the widget's coordinates relative to the
window origin (in FLTK 1.x).
Unfortunately I don't understand what you're testing in your demo
program (how can you see whether you got a _valid_ image?), so I
can't it test myself...
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk