Fix creating CGContext from drawing context

Save initial affine transformations for just created CGContext
(like it's done in all wxMacCoreGraphicsContext ctors) to properly
manage user-defined transformations in SetTransform(),
GetTransform().
This commit is contained in:
Artur Wieczorek
2021-09-02 19:08:26 +02:00
parent 303d899cc0
commit cf881ad03a

View File

@@ -1814,6 +1814,7 @@ bool wxMacCoreGraphicsContext::EnsureIsValid()
}
}
#endif
m_initTransform = CGContextGetCTM(m_cgContext);
CGContextConcatCTM( m_cgContext, m_windowTransform );
CGContextSetTextMatrix( m_cgContext, CGAffineTransformIdentity );
m_contextSynthesized = true;