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 --- FL/Fl_Graphics_Driver.H | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'FL/Fl_Graphics_Driver.H') diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index bd4a82326..27778da2f 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -395,6 +395,12 @@ public: virtual void font_name(int num, const char *name) {} /** Support function for Fl_Shared_Image drawing */ virtual int draw_scaled(Fl_Image *img, int X, int Y, int W, int H); + /** Support function for fl_overlay_rect() and scaled GUI. + Defaut implementation may be enough */ + virtual bool overlay_rect_unscaled(); + /** Support function for fl_overlay_rect() and scaled GUI. + Defaut implementation may be enough */ + virtual void overlay_rect(int x, int y, int w , int h) { loop(x, y, x+w-1, y, x+w-1, y+h-1, x, y+h-1); } }; #ifndef FL_DOXYGEN -- cgit v1.2.3