summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/Quartz')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx13
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);
}