From 5bca49633571642ad129bc47b2f8eb672477df0e Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 20 Apr 2010 21:00:02 +0000 Subject: [PATCH] backport of order fixes for transform concatenations git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@64083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/graphics.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mac/carbon/graphics.cpp b/src/mac/carbon/graphics.cpp index e0e481b2c8..1cddf4f636 100755 --- a/src/mac/carbon/graphics.cpp +++ b/src/mac/carbon/graphics.cpp @@ -898,7 +898,7 @@ wxGraphicsObjectRefData *wxMacCoreGraphicsMatrixData::Clone() const // concatenates the matrix void wxMacCoreGraphicsMatrixData::Concat( const wxGraphicsMatrixData *t ) { - m_matrix = CGAffineTransformConcat(m_matrix, *((CGAffineTransform*) t->GetNativeMatrix()) ); + m_matrix = CGAffineTransformConcat(*((CGAffineTransform*) t->GetNativeMatrix()), m_matrix); } // sets the matrix to the respective values @@ -1425,10 +1425,10 @@ void wxMacCoreGraphicsContext::EnsureIsValid() wxASSERT_MSG( status == noErr , wxT("Cannot nest wxDCs on the same window") ); CGContextConcatCTM( m_cgContext, m_windowTransform ); - CGContextSaveGState( m_cgContext ); - m_releaseContext = true; - if ( (HIShapeRef) m_clipRgn != NULL ) - { + CGContextSaveGState( m_cgContext ); + m_releaseContext = true; + if ( (HIShapeRef) m_clipRgn != NULL ) + { // the clip region is in device coordinates, so we convert this again to user coordinates wxMacCFRefHolder hishape ; hishape.Set( HIShapeCreateMutableCopy( m_clipRgn ) ); @@ -1445,9 +1445,9 @@ void wxMacCoreGraphicsContext::EnsureIsValid() HIShapeReplacePathInCGContext( hishape, m_cgContext ); CGContextClip( m_cgContext ); } - } - CGContextSaveGState( m_cgContext ); - } + } + CGContextSaveGState( m_cgContext ); + } } bool wxMacCoreGraphicsContext::SetLogicalFunction( int function ) @@ -2077,7 +2077,7 @@ void wxMacCoreGraphicsContext::ConcatTransform( const wxGraphicsMatrix& matrix ) if ( m_cgContext ) CGContextConcatCTM( m_cgContext, *(CGAffineTransform*) matrix.GetNativeMatrix()); else - m_windowTransform = CGAffineTransformConcat(m_windowTransform, *(CGAffineTransform*) matrix.GetNativeMatrix()); + m_windowTransform = CGAffineTransformConcat( *(CGAffineTransform*) matrix.GetNativeMatrix(),m_windowTransform); } // sets the transform of this context