From 94fffb701ce88adf7398fb37a007a04c08f1ca6f Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 6 Jun 2019 18:28:49 +0200 Subject: Add one argument to Fl_Screen_Driver::read_win_rectangle() The new argument gives the window to be captured, or NULL to indicate capture from the current offscreen. Calling this function becomes easier because less dependent on global variables. --- src/Fl_Screen_Driver.H | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Fl_Screen_Driver.H') diff --git a/src/Fl_Screen_Driver.H b/src/Fl_Screen_Driver.H index 8ae19a816..511f892d2 100644 --- a/src/Fl_Screen_Driver.H +++ b/src/Fl_Screen_Driver.H @@ -150,8 +150,10 @@ public: 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(). + + win is the window to capture from, or NULL to capture from the current offscreen */ - virtual Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h) {return NULL;} + virtual Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win) {return NULL;} static void write_image_inside(Fl_RGB_Image *to, Fl_RGB_Image *from, int to_x, int to_y); static Fl_RGB_Image *traverse_to_gl_subwindows(Fl_Group *g, int x, int y, int w, int h, Fl_RGB_Image *full_img); -- cgit v1.2.3