diff options
| author | Manolo Gouy <Manolo> | 2018-01-07 18:16:52 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-01-07 18:16:52 +0000 |
| commit | 46d8ef2c1d60ef5462a1a8b263dfe218b6288a64 (patch) | |
| tree | fdd119954b50826715ea50e32e13c2f0c9b494a9 | |
| parent | 8befad4dba68fa44fca99608052668025baf8fc4 (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
| -rw-r--r-- | src/Fl_cocoa.mm | 2 |
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 |
