On Oct 9, 2007, at 12:30 AM, Kurt Konolige wrote:

> Hi, I want to save the contents of an FLTK double-window as a PNG  
> or PPM
> file.  Is there an easy way to do this (from a program, not using a
> screenshot)?


Anothe way to get the window contents:

include <FL/x.H>

Fl_X *x = Fl_X::i(myWindow);

Now x->other_xid returns the X11 "Window" information for the  
backbuffer of the double buffered FLTK window. You can now read the  
X11 Window contents using the standard X11 calls like XGetImage.

Oh, and if you are reading during a derived "draw" call, fl_window  
will give you the X11 "Window" information as well.

Matthias

----
http://robowerk.com/


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

Reply via email to