diff options
| author | Manolo Gouy <Manolo> | 2017-12-27 13:51:41 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-12-27 13:51:41 +0000 |
| commit | 7abda5a59b8bccd59138ea49e5866041cc482b8a (patch) | |
| tree | ddada6dc8acae589587948fa253e24a726769608 /src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx | |
| parent | 7aa6b582ee209105dc31a54fa49591ee1af83488 (diff) | |
GUI rescaling under MacOS: fix Fl_Cocoa_Screen_Driver::read_image() when reading from scaled offscreen buffer
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12609 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx')
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx index 573a5df8e..1702ca4ab 100644 --- a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx @@ -104,7 +104,10 @@ Fl_RGB_Image* Fl_Quartz_Image_Surface_Driver::image() CGContextFlush(offscreen); int W = CGBitmapContextGetWidth(offscreen); int H = CGBitmapContextGetHeight(offscreen); + int save_w = width, save_h = height; + width = W; height = H; unsigned char *data = fl_read_image(NULL, 0, 0, W, H, 0); + width = save_w; height = save_h; Fl_RGB_Image *image = new Fl_RGB_Image(data, W, H); image->alloc_array = 1; return image; |
