summaryrefslogtreecommitdiff
path: root/src/Fl_Image_Surface.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-09-23 13:51:42 +0000
committerManolo Gouy <Manolo>2015-09-23 13:51:42 +0000
commitfe6117554647a4f54fb151a97d825fc408d653f5 (patch)
tree90907531532d6af9d46b499e343e17a80c6d9d0a /src/Fl_Image_Surface.cxx
parent2af2d88dceba233eae80726c2ca94a8021aa69aa (diff)
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
Diffstat (limited to 'src/Fl_Image_Surface.cxx')
-rw-r--r--src/Fl_Image_Surface.cxx2
1 files changed, 2 insertions, 0 deletions
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());