Corrected case when using retina display.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2014-11-26 20:42:08 +00:00
parent 3e399aa704
commit a482495236

View File

@ -3881,7 +3881,7 @@ static CGImageRef GL_rect_to_CGImage_10_5(Fl_Window *win, int x, int y, int w, i
if (!pi) return NULL;
Fl_RGB_Image *img = pi->rectangle_capture(win, x, y, w, h);
CGColorSpaceRef cSpace = CGColorSpaceCreateDeviceRGB();
CGDataProviderRef provider = CGDataProviderCreateWithData(img, img->array, img->ld() * h, imgProviderReleaseData);
CGDataProviderRef provider = CGDataProviderCreateWithData(img, img->array, img->ld() * img->h(), imgProviderReleaseData);
CGImageRef image = CGImageCreate(img->w(), img->h(), 8, 24, img->ld(), cSpace,
(CGBitmapInfo)(kCGImageAlphaNone),
provider, NULL, false, kCGRenderingIntentDefault);