summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx2
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
index f97dabf04..e1fa62e42 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
@@ -338,7 +338,7 @@ void Fl_Quartz_Graphics_Driver::draw_CGImage(CGImageRef cgimg, int x, int y, int
} else if (at.a == 0.5) {
doit = true;
if (Fl_Display_Device::high_resolution()) { // make .tx and .ty have int or half-int values
- deltax = (at.tx*2 - round(at.tx*2));
+ deltax = -(at.tx*2 - round(at.tx*2));
deltay = (at.ty*2 - round(at.ty*2));
} else { // make .tx and .ty have integral values
deltax = (at.tx - round(at.tx))*2;
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
index aa84d7777..e0a3a50ee 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
@@ -281,10 +281,11 @@ void Fl_Quartz_Graphics_Driver::restore_clip() {
if ( ! fl_window ) { // a bitmap context
CGFloat hgt = CGBitmapContextGetHeight(fl_gc);
CGAffineTransform at = CGContextGetCTM(fl_gc);
+ CGFloat offset = 0.5;
if (at.a != 1 && at.a == at.d && at.b == 0 && at.c == 0) { // proportional scaling, no rotation
hgt /= at.a;
- }
- CGContextTranslateCTM(fl_gc, 0.5, hgt-0.5f);
+ offset /= at.a; }
+ CGContextTranslateCTM(fl_gc, offset, hgt-offset);
CGContextScaleCTM(fl_gc, 1.0f, -1.0f); // now 0,0 is top-left point of the context
}
color(color());