X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f43f2691c41174a54c6978f01c0c6be19d5c662..9914bfbb77f48baf869b63aff58feb2b145ff4d3:/src/osx/carbon/graphics.cpp diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 03fd9e2c50..99e1921ebf 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -1461,14 +1461,18 @@ public : m_cg = cg; m_offset = offset; if ( m_offset ) - CGContextTranslateCTM( m_cg, (CGFloat) 0.5, (CGFloat) 0.5 ); + { + m_userOffset = CGContextConvertSizeToUserSpace( m_cg, CGSizeMake( 0.5 , 0.5 ) ); + CGContextTranslateCTM( m_cg, m_userOffset.width , m_userOffset.height ); + } } ~wxQuartzOffsetHelper( ) { if ( m_offset ) - CGContextTranslateCTM( m_cg, (CGFloat) -0.5, (CGFloat) -0.5 ); + CGContextTranslateCTM( m_cg, -m_userOffset.width , -m_userOffset.height ); } public : + CGSize m_userOffset; CGContextRef m_cg; bool m_offset; } ;