From fe6117554647a4f54fb151a97d825fc408d653f5 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 23 Sep 2015 13:51:42 +0000 Subject: Mac OS: fixed the Fl_Image_Surface class that produced flipped images when the app draws directly to it, without using Fl_Image_Surface::draw(Fl_Widget*, int, int). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10865 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Image_Surface.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx index 11ea267dc..923431123 100644 --- a/src/Fl_Image_Surface.cxx +++ b/src/Fl_Image_Surface.cxx @@ -42,6 +42,8 @@ Fl_Image_Surface::Fl_Image_Surface(int w, int h) : Fl_Surface_Device(NULL) { helper = new Fl_Quartz_Flipped_Surface_(width, height); driver(helper->driver()); CGContextSaveGState(offscreen); + CGContextTranslateCTM(offscreen, 0, height); + CGContextScaleCTM(offscreen, 1.0f, -1.0f); #elif defined(WIN32) helper = new Fl_GDI_Surface_(); driver(helper->driver()); -- cgit v1.2.3