From c472d5d8b76e17e4dd537ca20c9bfb144b06189c Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 9 Feb 2018 13:48:22 +0000 Subject: Fix fl_read_image() under MacOS platform when GUI is rescaled. This commit also simplifies the platform-dependent support of fl_read_image(): only Fl_XXX_Screen_Driver::read_win_rectangle() contains platform-specific code to capture pixels from the current window or from an offscreen buffer. Platform-independent function Fl_Screen_Driver::traverse_to_gl_subwindows() captures subwindows that intersect with the area fl_read_image() targets. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12653 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Widget_Surface.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Fl_Widget_Surface.cxx') diff --git a/src/Fl_Widget_Surface.cxx b/src/Fl_Widget_Surface.cxx index 7adc4361e..64f86d9ed 100644 --- a/src/Fl_Widget_Surface.cxx +++ b/src/Fl_Widget_Surface.cxx @@ -157,7 +157,7 @@ void Fl_Widget_Surface::print_window_part(Fl_Window *win, int x, int y, int w, i win->show(); Fl::check(); win->driver()->flush(); // makes the window current - Fl_RGB_Image *img = Fl_Screen_Driver::traverse_to_gl_subwindows(win, NULL, x, y, w, h, 0, NULL); + Fl_RGB_Image *img = Fl_Screen_Driver::traverse_to_gl_subwindows(win, x, y, w, h, NULL); Fl_Shared_Image *shared = Fl_Shared_Image::get(img); shared->scale(w, h, 1, 1); if (save_front != win) save_front->show(); -- cgit v1.2.3