X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1011fbebdba72e821a901a43d15fc2955b14101f..f4bc1aa27cb33f679d7e9c1518a7855bbc1fa471:/src/osx/carbon/graphics.cpp diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index cef1c5d805..436b9f8dd1 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -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 }