]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/graphics.cpp
wxUSE_PROPGRID is now recognized by source and header files
[wxWidgets.git] / src / osx / carbon / graphics.cpp
index cef1c5d8055eb27110bb25eb2dfd54941611e9f5..436b9f8dd1ca660fe9aed703784f14663cc33438 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/mac/carbon/dccg.cpp
+// Name:        src/osx/carbon/dccg.cpp
 // Purpose:     wxDC class
 // Author:      Stefan Csomor
 // Modified by:
@@ -103,8 +103,13 @@ OSStatus wxMacDrawCGImage(
 #if wxOSX_USE_CARBON
     return HIViewDrawCGImage( inContext, inBounds, inImage );
 #else
-    // todo flip
-    CGContextDrawImage(inContext, *inBounds, inImage );
+    CGContextSaveGState(inContext);
+    CGContextTranslateCTM(inContext, inBounds->origin.x, inBounds->origin.y + inBounds->size.height);
+    CGRect r = *inBounds;
+    r.origin.x = r.origin.y = 0;
+    CGContextScaleCTM(inContext, 1, -1);
+    CGContextDrawImage(inContext, r, inImage );
+    CGContextRestoreGState(inContext);
     return noErr;
 #endif
 }