]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/graphics.cpp
guard code for mac / quickdraw
[wxWidgets.git] / src / mac / carbon / graphics.cpp
index e06b5404c07ba3c4f66c5f0132ceff17fc363255..0766f67236b93b797924fcdd4afd4b7bfe2c24e6 100644 (file)
 
 #include "wx/mac/private.h"
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
-typedef float CGFloat;
-#endif
-
-#ifdef __LP64__
-#define wxMAC_USE_CORE_TEXT 1
-#else
-#define wxMAC_USE_ATSU_TEXT 1
-#endif
-#undef wxMAC_USE_CG_TEXT 
 //-----------------------------------------------------------------------------
 // constants
 //-----------------------------------------------------------------------------
@@ -1454,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 );