summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2014-11-06 16:48:57 +0000
committerManolo Gouy <Manolo>2014-11-06 16:48:57 +0000
commitbd1446a6eb5b845179bb850c0f371a323141e8b0 (patch)
treeb1dd6983fc41879881452d9e91f89e2fadb636f5 /FL
parentf5e023f9c8a9b328b623804f67bbcb104dc7b6ff (diff)
Fix for STR#3142 where fl_read_image() correctly reads GL data under X11, but ignores them under MSWindows and Mac OS X.
Moreover, fl_read_image() behaves differently with and without OS virtualization for X11 and MSWindows. The patched function reads whatever is in the rectangle transmitted in arguments, with and without GL data, with and without subwindows, on ‘true’ OS or on virtualized OS. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Device.H8
1 files changed, 6 insertions, 2 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H
index 96ac0ca64..619e41b16 100644
--- a/FL/Fl_Device.H
+++ b/FL/Fl_Device.H
@@ -4,7 +4,7 @@
// Definition of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device
// for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2012 by Bill Spitzak and others.
+// Copyright 2010-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -558,7 +558,7 @@ public:
/**
This plugin socket allows the integration of new device drivers for special
window or screen types. It is currently used to provide an automated printing
- service for OpenGL windows, if linked with fltk_gl.
+ service and screen capture for OpenGL windows, if linked with fltk_gl.
*/
class FL_EXPORT Fl_Device_Plugin : public Fl_Plugin {
public:
@@ -575,6 +575,10 @@ public:
\param height height of the current drawing area
*/
virtual int print(Fl_Widget* w, int x, int y, int height) = 0;
+ /** captures a rectangle of a widget as an image
+ \return The captured pixels as an RGB image
+ */
+ virtual Fl_RGB_Image* rectangle_capture(Fl_Widget *widget, int x, int y, int w, int h) = 0;
};
#endif // Fl_Device_H