]> git.saurik.com Git - wxWidgets.git/commitdiff
missing methods
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 28 Oct 2006 16:53:07 +0000 (16:53 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 28 Oct 2006 16:53:07 +0000 (16:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/graphics.cpp

index a5599faab92945a638300fea3afeac745a613282..a5222724f3ce287ffe28a47beb9f233b04ca9d4b 100755 (executable)
@@ -1752,16 +1752,24 @@ void * wxMacCoreGraphicsContext::GetNativeContext()
 // 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 )
 {
+    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
 {
+    wxGraphicsMatrix m = CreateMatrix();
+    *((CGAffineTransform*) m.GetNativeMatrix()) = CGContextGetCTM( m_cgContext );
+    return m;
 }
 
 //