summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-01-04 07:44:31 +0000
committerManolo Gouy <Manolo>2017-01-04 07:44:31 +0000
commit06924c37cbbe78cadecd6c1779ab0624f6c6c193 (patch)
treeda03b33185bfaeafcdea732b11da66c2d555e004
parent06b98099f90ec06d9c37205dd45426f423f8ecff (diff)
Add implementation explanatory comments about how the screen driver supports public function fl_read_image().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12157 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/Fl_Screen_Driver.H15
1 files changed, 15 insertions, 0 deletions
diff --git a/FL/Fl_Screen_Driver.H b/FL/Fl_Screen_Driver.H
index 57a8bfee0..762358412 100644
--- a/FL/Fl_Screen_Driver.H
+++ b/FL/Fl_Screen_Driver.H
@@ -123,6 +123,21 @@ public:
#if defined(FL_PORTING)
# pragma message "FL_PORTING: implement code to read RGB data from screen"
#endif
+ /* Both member functions read_image() and read_win_rectangle() support
+ the public function fl_read_image() which captures pixel data either from
+ the current window or from an offscreen buffer.
+
+ A platform re-implements either read_image() or read_win_rectangle().
+ In the 1st case and for capture from a window, the returned pixel array
+ also contains data from any embedded sub-window.
+ In the 2nd case and for capture from a window, only data from the current
+ window is collected, and read_image()'s default implementation captures
+ pixels from any subwindow.
+
+ A platform may also use its read_win_rectangle() implementation to capture
+ window decorations (e.g., title bar). In that case, it is called by
+ Fl_XXX_Window_Driver::capture_titlebar_and_borders().
+ */
virtual uchar *read_image(uchar *p, int x, int y, int w, int h, int alpha);
virtual Fl_RGB_Image *read_win_rectangle(uchar *p, int X, int Y, int w, int h, int alpha) {return NULL;}
static void write_image_inside(Fl_RGB_Image *to, Fl_RGB_Image *from, int to_x, int to_y);