git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42582
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// concatenates this transform with the current transform of this context
void wxMacCoreGraphicsContext::ConcatTransform( const wxGraphicsMatrix& matrix )
{
// concatenates this transform with the current transform of this context
void wxMacCoreGraphicsContext::ConcatTransform( const wxGraphicsMatrix& matrix )
{
+ CGContextConcatCTM( m_cgContext, *(CGAffineTransform*) matrix.GetNativeMatrix());
}
// sets the transform of this context
void wxMacCoreGraphicsContext::SetTransform( const wxGraphicsMatrix& matrix )
{
}
// sets the transform of this context
void wxMacCoreGraphicsContext::SetTransform( const wxGraphicsMatrix& matrix )
{
+ CGAffineTransform transform = CGContextGetCTM( m_cgContext );
+ transform = CGAffineTransformInvert( transform ) ;
+ CGContextConcatCTM( m_cgContext, transform);
+ CGContextConcatCTM( m_cgContext, *(CGAffineTransform*) matrix.GetNativeMatrix());
}
// gets the matrix of this context
wxGraphicsMatrix wxMacCoreGraphicsContext::GetTransform() const
{
}
// gets the matrix of this context
wxGraphicsMatrix wxMacCoreGraphicsContext::GetTransform() const
{
+ wxGraphicsMatrix m = CreateMatrix();
+ *((CGAffineTransform*) m.GetNativeMatrix()) = CGContextGetCTM( m_cgContext );
+ return m;