summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-01-07 18:16:52 +0000
committerManolo Gouy <Manolo>2018-01-07 18:16:52 +0000
commit46d8ef2c1d60ef5462a1a8b263dfe218b6288a64 (patch)
treefdd119954b50826715ea50e32e13c2f0c9b494a9 /src
parent8befad4dba68fa44fca99608052668025baf8fc4 (diff)
MacOS: More accurate coordinate computation in rect_to_NSBitmapImageRep() when GUI is rescaled.
The modified statement uses the window height in graphics coordinates that has been truncated to integer at window creation and resize. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12625 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 64363af41..f8ff28004 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -4190,7 +4190,7 @@ static NSBitmapImageRep* rect_to_NSBitmapImageRep(Fl_Window *win, int x, int y,
rect = NSMakeRect(s*x - 0.5, s*y - 0.5, s*w, s*h);
}
else {
- rect = NSMakeRect(x*s, win->h()*s-(y+h)*s, w*s, h*s);
+ rect = NSMakeRect(x*s, int(win->h()*s)-(y+h)*s, w*s, h*s);
// lock focus to win's view
winview = [fl_xid(win) contentView];
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4