]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing reset clip
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 31 Oct 2006 10:40:51 +0000 (10:40 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 31 Oct 2006 10:40:51 +0000 (10:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/graphics.cpp

index 666d1322ec4bdef10c331eb263e052d7ce14e1cf..a79c96bfc94fc2769c867dd06d99249c680b8b22 100755 (executable)
@@ -1312,8 +1312,15 @@ void wxMacCoreGraphicsContext::ResetClip()
 {
     if ( m_cgContext )
     {
+        // there is no way for clearing the clip, we can only revert to the stored
+        // state, but then we have to make sure everything else is NOT restored
+        CGAffineTransform transform = CGContextGetCTM( m_cgContext );
         CGContextRestoreGState( m_cgContext );
         CGContextSaveGState( m_cgContext );
+        CGAffineTransform transformNew = CGContextGetCTM( m_cgContext );
+        transformNew = CGAffineTransformInvert( transformNew ) ;
+        CGContextConcatCTM( m_cgContext, transformNew);
+        CGContextConcatCTM( m_cgContext, transform);
     }
     else
     {