summaryrefslogtreecommitdiff
path: root/src/Fl_win32.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/Fl_win32.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/Fl_win32.cxx')
-rw-r--r--src/Fl_win32.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 74b2f317b..0a8e399b9 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -2710,17 +2710,17 @@ void Fl_WinAPI_Window_Driver::capture_titlebar_and_borders(Fl_Shared_Image *&top
// capture the 4 window sides from screen
Fl_WinAPI_Screen_Driver *dr = (Fl_WinAPI_Screen_Driver *)Fl::screen_driver();
if (htop) {
- r_top = dr->read_win_rectangle_unscaled(NULL, r.left, r.top, r.right - r.left, htop, 0);
+ r_top = dr->read_win_rectangle_unscaled(r.left, r.top, r.right - r.left, htop);
top = Fl_Shared_Image::get(r_top);
if (DWMscaling != 1)
top->scale(ww, htop / DWMscaling, 0, 1);
}
if (wsides) {
- r_left = dr->read_win_rectangle_unscaled(NULL, r.left, r.top + htop, wsides, h() * scaling, 0);
+ r_left = dr->read_win_rectangle_unscaled(r.left, r.top + htop, wsides, h() * scaling);
left = Fl_Shared_Image::get(r_left);
- r_right = dr->read_win_rectangle_unscaled(NULL, r.right - wsides, r.top + htop, wsides, h() * scaling, 0);
+ r_right = dr->read_win_rectangle_unscaled(r.right - wsides, r.top + htop, wsides, h() * scaling);
right = Fl_Shared_Image::get(r_right);
- r_bottom = dr->read_win_rectangle_unscaled(NULL, r.left, r.bottom - hbottom, ww, hbottom, 0);
+ r_bottom = dr->read_win_rectangle_unscaled(r.left, r.bottom - hbottom, ww, hbottom);
bottom = Fl_Shared_Image::get(r_bottom);
if (scaling != 1) {
left->scale(wsides, h(), 0, 1);