summaryrefslogtreecommitdiff
path: root/src/drivers/X11/Fl_X11_Window_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-02-09 13:48:22 +0000
committerManolo Gouy <Manolo>2018-02-09 13:48:22 +0000
commitc472d5d8b76e17e4dd537ca20c9bfb144b06189c (patch)
treefbe64110002b5d36127631c37cc5d1bb44f86318 /src/drivers/X11/Fl_X11_Window_Driver.cxx
parentb78b2f7f5f24b98640d31bb8ee7b573703e8cc19 (diff)
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
Diffstat (limited to 'src/drivers/X11/Fl_X11_Window_Driver.cxx')
-rw-r--r--src/drivers/X11/Fl_X11_Window_Driver.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx
index 5612ce4df..b89688b47 100644
--- a/src/drivers/X11/Fl_X11_Window_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx
@@ -413,22 +413,22 @@ void Fl_X11_Window_Driver::capture_titlebar_and_borders(Fl_Shared_Image*& top, F
htop /= s; wsides /= s;
fl_window = parent;
if (htop) {
- r_top = Fl::screen_driver()->read_win_rectangle(NULL, 0, 0, - (w() + 2 * wsides), htop, 0);
+ r_top = Fl::screen_driver()->read_win_rectangle(0, 0, - (w() + 2 * wsides), htop);
top = Fl_Shared_Image::get(r_top);
top->scale(w() + 2 * wsides, htop, 0, 1);
}
if (wsides) {
- r_left = Fl::screen_driver()->read_win_rectangle(NULL, 0, htop, -wsides, h(), 0);
+ r_left = Fl::screen_driver()->read_win_rectangle(0, htop, -wsides, h());
if (r_left) {
left = Fl_Shared_Image::get(r_left);
left->scale(wsides, h(), 0, 1);
}
- r_right = Fl::screen_driver()->read_win_rectangle(NULL, w() + wsides, htop, -wsides, h(), 0);
+ r_right = Fl::screen_driver()->read_win_rectangle(w() + wsides, htop, -wsides, h());
if (r_right) {
right = Fl_Shared_Image::get(r_right);
right->scale(wsides, h(), 0, 1);
}
- r_bottom = Fl::screen_driver()->read_win_rectangle(NULL, 0, htop + h(), -(w() + 2*wsides), hbottom, 0);
+ r_bottom = Fl::screen_driver()->read_win_rectangle(0, htop + h(), -(w() + 2*wsides), hbottom);
if (r_bottom) {
bottom = Fl_Shared_Image::get(r_bottom);
bottom->scale(w() + 2*wsides, wsides, 0, 1);