fixing switches

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2007-11-27 15:26:24 +00:00
parent 85baeafb62
commit d2d8b4db08

View File

@ -705,8 +705,8 @@ wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* rendere
{ {
m_macATSUIStyle = NULL; m_macATSUIStyle = NULL;
#ifdef wxMAC_USE_CORE_TEXT #if wxMAC_USE_CORE_TEXT
#elif defined(wxMAC_USE_ATSU_TEXT) #elif wxMAC_USE_ATSU_TEXT
OSStatus status; OSStatus status;
status = ATSUCreateAndCopyStyle( (ATSUStyle) font.MacGetATSUStyle() , &m_macATSUIStyle ); status = ATSUCreateAndCopyStyle( (ATSUStyle) font.MacGetATSUStyle() , &m_macATSUIStyle );
@ -739,20 +739,20 @@ wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* rendere
atsuTags, atsuSizes, atsuValues); atsuTags, atsuSizes, atsuValues);
wxASSERT_MSG( status == noErr , wxT("couldn't modify ATSU style") ); wxASSERT_MSG( status == noErr , wxT("couldn't modify ATSU style") );
#elif defined(WXMAC_USE_CG_TEXT) #elif WXMAC_USE_CG_TEXT
#endif #endif
} }
wxMacCoreGraphicsFontData::~wxMacCoreGraphicsFontData() wxMacCoreGraphicsFontData::~wxMacCoreGraphicsFontData()
{ {
#ifdef wxMAC_USE_CORE_TEXT #if wxMAC_USE_CORE_TEXT
#elif defined(wxMAC_USE_ATSU_TEXT) #elif wxMAC_USE_ATSU_TEXT
if ( m_macATSUIStyle ) if ( m_macATSUIStyle )
{ {
::ATSUDisposeStyle((ATSUStyle)m_macATSUIStyle); ::ATSUDisposeStyle((ATSUStyle)m_macATSUIStyle);
m_macATSUIStyle = NULL; m_macATSUIStyle = NULL;
} }
#elif defined(WXMAC_USE_CG_TEXT) #elif WXMAC_USE_CG_TEXT
#endif #endif
} }
@ -1719,11 +1719,11 @@ void wxMacCoreGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDoub
return; return;
EnsureIsValid(); EnsureIsValid();
#ifdef wxMAC_USE_CORE_TEXT #if wxMAC_USE_CORE_TEXT
// TODO core text implementation here // TODO core text implementation here
#elif defined(wxMAC_USE_ATSU_TEXT) #elif wxMAC_USE_ATSU_TEXT
DrawText(str, x, y, 0.0); DrawText(str, x, y, 0.0);
#elif defined(WXMAC_USE_CG_TEXT) #elif WXMAC_USE_CG_TEXT
// TODO core graphics text implementation here // TODO core graphics text implementation here
#endif #endif
} }
@ -1734,10 +1734,10 @@ void wxMacCoreGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDoub
return; return;
EnsureIsValid(); EnsureIsValid();
#ifdef wxMAC_USE_CORE_TEXT #if wxMAC_USE_CORE_TEXT
// default implementation takes care of rotation and calls non rotated DrawText afterwards // default implementation takes care of rotation and calls non rotated DrawText afterwards
wxGraphicsContext::DrawText( str, x, y, angle ); wxGraphicsContext::DrawText( str, x, y, angle );
#elif defined(wxMAC_USE_ATSU_TEXT) #elif wxMAC_USE_ATSU_TEXT
OSStatus status = noErr; OSStatus status = noErr;
ATSUTextLayout atsuLayout; ATSUTextLayout atsuLayout;
UniCharCount chars = str.length(); UniCharCount chars = str.length();
@ -1843,7 +1843,7 @@ void wxMacCoreGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDoub
#if SIZEOF_WCHAR_T == 4 #if SIZEOF_WCHAR_T == 4
free( ubuf ); free( ubuf );
#endif #endif
#elif defined(WXMAC_USE_CG_TEXT) #elif WXMAC_USE_CG_TEXT
// default implementation takes care of rotation and calls non rotated DrawText afterwards // default implementation takes care of rotation and calls non rotated DrawText afterwards
wxGraphicsContext::DrawText( str, x, y, angle ); wxGraphicsContext::DrawText( str, x, y, angle );
#endif #endif
@ -1866,9 +1866,9 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
if (str.empty()) if (str.empty())
return; return;
#ifdef wxMAC_USE_CORE_TEXT #if wxMAC_USE_CORE_TEXT
// TODO core text implementation here // TODO core text implementation here
#elif defined(wxMAC_USE_ATSU_TEXT) #elif wxMAC_USE_ATSU_TEXT
OSStatus status = noErr; OSStatus status = noErr;
ATSUTextLayout atsuLayout; ATSUTextLayout atsuLayout;
@ -1923,7 +1923,7 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
#if SIZEOF_WCHAR_T == 4 #if SIZEOF_WCHAR_T == 4
free( ubuf ) ; free( ubuf ) ;
#endif #endif
#elif defined(WXMAC_USE_CG_TEXT) #elif WXMAC_USE_CG_TEXT
// TODO core graphics text implementation here // TODO core graphics text implementation here
#endif #endif
} }
@ -1936,9 +1936,9 @@ void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArr
if (text.empty()) if (text.empty())
return; return;
#ifdef wxMAC_USE_CORE_TEXT #if wxMAC_USE_CORE_TEXT
// TODO core text implementation here // TODO core text implementation here
#elif defined(wxMAC_USE_ATSU_TEXT) #elif wxMAC_USE_ATSU_TEXT
ATSUTextLayout atsuLayout; ATSUTextLayout atsuLayout;
UniCharCount chars = text.length(); UniCharCount chars = text.length();
UniChar* ubuf = NULL; UniChar* ubuf = NULL;
@ -1990,7 +1990,7 @@ void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArr
#if SIZEOF_WCHAR_T == 4 #if SIZEOF_WCHAR_T == 4
free( ubuf ) ; free( ubuf ) ;
#endif #endif
#elif defined(WXMAC_USE_CG_TEXT) #elif WXMAC_USE_CG_TEXT
// TODO core graphics text implementation here // TODO core graphics text implementation here
#endif #endif
} }