From 7c0c17a45256953fd487865a6c5cd91e5b5f94d0 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 15 Jul 2015 21:47:39 +0000 Subject: Preparing for Mac OS 10.11 'El Capitan': change in rect_to_NSBitmapImageRep(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10790 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index dee4e1fea..82680d4db 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -4219,6 +4219,8 @@ static NSBitmapImageRep* rect_to_NSBitmapImageRep(Fl_Window *win, int x, int y, NSBitmapImageRep *childbitmap = rect_to_NSBitmapImageRep(sub, clip.origin.x - sub->x(), win->h() - clip.origin.y - sub->y() - clip.size.height, clip.size.width, clip.size.height); if (childbitmap) { + // if bitmap is high res and childbitmap is not, childbitmap must be rescaled + if ([bitmap pixelsWide] > w && [childbitmap pixelsWide] == clip.size.width) childbitmap = scale_nsbitmapimagerep(childbitmap, 2); if ( ([bitmap bitmapFormat] & NSAlphaFirstBitmapFormat) && !([childbitmap bitmapFormat] & NSAlphaFirstBitmapFormat) ) { // bitmap is ARGB and childbitmap is RGBA --> convert childbitmap to ARGB too uchar *b = [childbitmap bitmapData]; @@ -4231,8 +4233,6 @@ static NSBitmapImageRep* rect_to_NSBitmapImageRep(Fl_Window *win, int x, int y, } } } - // if bitmap is high res and childbitmap is not, childbitmap must be rescaled - if ([bitmap pixelsWide] > w && [childbitmap pixelsWide] == clip.size.width) childbitmap = scale_nsbitmapimagerep(childbitmap, 2); write_bitmap_inside(bitmap, w, childbitmap, clip.origin.x - x, win->h() - clip.origin.y - clip.size.height - y ); } -- cgit v1.2.3