]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/graphics.cpp
making sure the repositioning within the contentview only happens if the parent reall...
[wxWidgets.git] / src / osx / carbon / graphics.cpp
index bb499d3df21488847a2a42630989448c0355afb0..27a04247883acfa1a1514862c1f304c5e4ab83ad 100644 (file)
@@ -171,7 +171,7 @@ CGColorRef wxMacCreateCGColor( const wxColour& col )
 CTFontRef wxMacCreateCTFont( const wxFont& font )
 {
 #ifdef __WXMAC__
-    return wxCFRetain((CTFontRef) font.MacGetCTFont());
+    return wxCFRetain((CTFontRef) font.GetCTFont());
 #else
     return CTFontCreateWithName( wxCFStringRef( font.GetFaceName(), wxLocale::GetSystemEncoding() ) , font.GetPointSize() , NULL );
 #endif
@@ -853,13 +853,13 @@ wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* rendere
     OSStatus status = noErr;
     m_macATSUIStyle = NULL;
 
-    status = ATSUCreateAndcopyStyle( (ATSUStyle) font.MacGetATSUStyle() , &m_macATSUIStyle );
+    status = ATSUCreateAndCopyStyle( (ATSUStyle) font.MacGetATSUStyle() , &m_macATSUIStyle );
 
     wxASSERT_MSG( status == noErr, wxT("couldn't create ATSU style") );
 
     // we need the scale here ...
 
-    Fixed atsuSize = IntToFixed( int( 1 * font.MacGetFontSize()) );
+    Fixed atsuSize = IntToFixed( int( 1 * font.GetPointSize()) );
     RGBColor atsuColor ;
     col.GetRGBColor( &atsuColor );
     ATSUAttributeTag atsuTags[] =
@@ -1698,7 +1698,6 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
         return true;
         
 #if wxOSX_USE_COCOA_OR_CARBON
-#if 1 // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
     if ( UMAGetSystemVersion() < 0x1060 )
     {
         CGCompositeOperation cop = kCGCompositeOperationSourceOver;
@@ -1738,9 +1737,11 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
         case wxCOMPOSITION_XOR:
             cop = kCGCompositeOperationXOR; 
             break;
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
         case wxCOMPOSITION_ADD:
             mode = kCGBlendModePlusLighter ;
             break;
+#endif
         default:
             return false;
         }
@@ -1749,9 +1750,9 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
         else
             CGContextSetBlendMode(m_cgContext, mode);
     }
-    else
-#endif
 #endif
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+    else
     {
         CGBlendMode mode = kCGBlendModeNormal;
         switch( op )
@@ -1798,6 +1799,7 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
         }
         CGContextSetBlendMode(m_cgContext, mode);
     }
+#endif
     return true;
 }