From: Stefan Csomor Date: Tue, 31 Oct 2006 10:40:51 +0000 (+0000) Subject: fixing reset clip X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a7868cdf6a8782a04a46791dd63de2ade825a8bc fixing reset clip git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/graphics.cpp b/src/mac/carbon/graphics.cpp index 666d1322ec..a79c96bfc9 100755 --- a/src/mac/carbon/graphics.cpp +++ b/src/mac/carbon/graphics.cpp @@ -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 {