From 2072fcd698b36e3608e56feb75a77e3f790c02ce Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 1 Mar 2016 21:10:16 +0000 Subject: Allow fl_draw_image() with negative L parameter for Mac OS - continued. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11260 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/drivers/Quartz') diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx index f06333daf..0e1f777f1 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx @@ -95,6 +95,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, CGDataProviderRelease(src); // draw the image into the destination context if (img) { + CGContextSaveGState(gc); CGContextTranslateCTM(gc, X, Y); if (linedelta < 0) { CGContextTranslateCTM(gc, 0, H-1); @@ -106,6 +107,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, } ((Fl_Quartz_Graphics_Driver*)fl_graphics_driver)->draw_CGImage(img, 0,0,W,H, 0,0,W,H); CGImageRelease(img); + CGContextRestoreGState(gc); } } -- cgit v1.2.3