On 02.02.2009, at 15:53, Fabio Bracci wrote: > I tried to look at Fl_Image* Fl_Widget::image() but it doesn't work: > the graph is made of Fl_Widgets and not directly of a large Fl_Image.
Fl_Image cannot do that yet. You can do some trickery with fl_create_offscreen and fl_begin_offscreen to generate the required bitmap and then use fl_read_image to grab the image as RGB form the offscreen buffer. Saving it as a jpeg or similar requires another 8 or so lines of code WRT the jpeg library. > The question is: is there any way to 'grab' the visualization of a > Fl_Scroll (or a Fl_Group)? I would expect an image at some level in > the fltk class hierarchy holding the image which is actually rendered, No, FLTK does not care about the image itself. It renders into the buffers provided by the system, which are usually not RGB or anything similar. Even in double buffereing, FLTK only uses what the system provides, but no "image" style data. The soultion above may solve this for you, but I am not entirely sure that you will get exactly what you need. > Alternatively any suggestion about how to 'capture' the whole > Fl_Scroll content is welcome as well! Again, the content of the scroll is redrawn when parts are revealed. You could move the scroll about and capture rectangles from within the scroll area and patch them later. That would look quite silly for the user though ;-) ---- http://robowerk.com/ _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
