]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing the usage of hishape
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 27 Nov 2007 10:00:15 +0000 (10:00 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 27 Nov 2007 10:00:15 +0000 (10:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/graphics.cpp

index c0ea9f714b61d7e734c1223e0397674d066fb983..0766f67236b93b797924fcdd4afd4b7bfe2c24e6 100644 (file)
@@ -1444,18 +1444,14 @@ void wxMacCoreGraphicsContext::Clip( const wxRegion &region )
 {
     if( m_cgContext )
     {
-        HIShapeRef shape = HIShapeCreateWithQDRgn( (RgnHandle) region.GetWXHRGN() );
-        HIShapeReplacePathInCGContext( shape, m_cgContext );
+        HIShapeReplacePathInCGContext( region.GetWXHRGN() , m_cgContext );
         CGContextClip( m_cgContext );
-        CFRelease( shape );
     }
     else
     {
         // this offsetting to device coords is not really correct, but since we cannot apply affine transforms
         // to regions we try at least to have correct translations
-        wxMacCFRefHolder<HIShapeRef> hishape ;
-        hishape.Set( HIShapeCreateWithQDRgn( (RgnHandle) region.GetWXHRGN() ));
-        HIMutableShapeRef mutableShape = HIShapeCreateMutableCopy( hishape );
+        HIMutableShapeRef mutableShape = HIShapeCreateMutableCopy( region.GetWXHRGN() );
         
         CGPoint transformedOrigin = CGPointApplyAffineTransform( CGPointZero, m_windowTransform );
         HIShapeOffset( mutableShape, transformedOrigin.x, transformedOrigin.y );