fixing double conversion

0.5 / scaleFactor is already doing the device to userspace conversion, avoid doing it twice (lead to a 0.125 user space offset on Retina)
This commit is contained in:
Stefan Csomor
2021-04-07 09:10:37 +02:00
parent 9353e102dd
commit e796ba880b

View File

@@ -1569,8 +1569,7 @@ public :
if ( m_offset )
{
const double f = 0.5 / scaleFactor;
const CGSize s = { f, f };
m_userOffset = CGContextConvertSizeToUserSpace(m_cg, s);
m_userOffset = CGSizeMake(f, f);
CGContextTranslateCTM( m_cg, m_userOffset.width , m_userOffset.height );
}
else