|
|
> Is there any (undocumented) method that I can use to access
> the buffer that draw() or its methods (addvertex, fillpath,
> etc..) so that, once I've completed my drawing, I could copy
> that buffer? I need to make a movie of my GUI for my
> customer, and I'd prefer not to have to recreate the drawing
> method again with a different API. Thanks!
You can read back the image that draw() creates by using the function:
uchar *fl_read_image(uchar *p, int X, int Y, int W, int H, int alpha =
0);
Which is a documented function, as it happens.
However, reading back from an on-screen buffer can be fraught with
difficulties, as that will read everything in the rectangle mapped for
your window, which may (or may not) have been overlayed by other
window's areas by the window manager (that fltk will not know about...)
You may be better compositing your image in an off-screen buffer, then
blitting that composited image to the display (and using fl_read_image()
on the offscreen to get your screen grabs too, of course.) See
fl_create_offscreen(...) et al in the docs for some description of using
this approach.
--
Ian
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
[ Direct Link to Message ] | |
|
| |