diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-23 10:03:02 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-23 10:03:02 +0200 |
| commit | 4bf9172a8e4f76842a2e011671cf5c057e8fe1d1 (patch) | |
| tree | 1c87724b15d5166a6c6f62204f5de2d3e4ac8dd0 /src/drivers/Quartz | |
| parent | 897a6910b60ad8331ddb451d9dbc6c62da2b4657 (diff) | |
Replace internal fl_create_offscreen() calls by new Fl_Image_Surface
Diffstat (limited to 'src/drivers/Quartz')
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx index d3f3d343a..fcd9e89c7 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx @@ -111,17 +111,8 @@ void Fl_Quartz_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Of CGDataProviderRelease(src_bytes); CGColorSpaceRelease(lut); } - float s = scale(); - Fl_Surface_Device *current = Fl_Surface_Device::surface(); - // test whether osrc was created by fl_create_offscreen() - fl_begin_offscreen(osrc); // does nothing if osrc was not created by fl_create_offscreen() - if (current != Fl_Surface_Device::surface()) { // osrc was created by fl_create_offscreen() - Fl_Image_Surface *imgs = (Fl_Image_Surface*)Fl_Surface_Device::surface(); - int pw, ph; - imgs->printable_rect(&pw, &ph); - s = sw / float(pw); - fl_end_offscreen(); - } + CGAffineTransform at = CGContextGetCTM(src); + float s = at.a; draw_CGImage(img, x, y, w, h, srcx, srcy, sw/s, sh/s); CGImageRelease(img); } |
