From cf881ad03a06234d6e7023505df934a29e98c449 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 2 Sep 2021 19:08:26 +0200 Subject: [PATCH] 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(). --- src/osx/carbon/graphics.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 36ccab6406..8dfcacacef 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -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;