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:
@@ -1569,8 +1569,7 @@ public :
|
|||||||
if ( m_offset )
|
if ( m_offset )
|
||||||
{
|
{
|
||||||
const double f = 0.5 / scaleFactor;
|
const double f = 0.5 / scaleFactor;
|
||||||
const CGSize s = { f, f };
|
m_userOffset = CGSizeMake(f, f);
|
||||||
m_userOffset = CGContextConvertSizeToUserSpace(m_cg, s);
|
|
||||||
CGContextTranslateCTM( m_cg, m_userOffset.width , m_userOffset.height );
|
CGContextTranslateCTM( m_cg, m_userOffset.width , m_userOffset.height );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user