translate 0.5 offset into user space before applying translation, see #11769, see #11771

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2010-02-28 17:29:47 +00:00
parent 8a484d9ef6
commit e812e279ba

View File

@@ -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;
} ;