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
This commit is contained in:
Stefan Csomor
2010-04-20 21:00:02 +00:00
parent 8cd3f025d8
commit 5bca496335

View File

@@ -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<HIMutableShapeRef> 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