X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/62f864c32c53356b7228591c85b14abc491c46f0..fe8635a7e78715344f0f4b6abc9d797931429333:/src/mac/classic/dc.cpp diff --git a/src/mac/classic/dc.cpp b/src/mac/classic/dc.cpp index 85f559f977..273aa554bd 100644 --- a/src/mac/classic/dc.cpp +++ b/src/mac/classic/dc.cpp @@ -1,26 +1,28 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dc.cpp +// Name: src/mac/classic/dc.cpp // Purpose: wxDC class // Author: Stefan Csomor // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "dc.h" -#endif +#include "wx/wxprec.h" #include "wx/dc.h" -#include "wx/app.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" + #include "wx/dcmemory.h" + #include "wx/dcprint.h" + #include "wx/region.h" + #include "wx/image.h" +#endif + #include "wx/mac/uma.h" -#include "wx/dcmemory.h" -#include "wx/dcprint.h" -#include "wx/region.h" -#include "wx/image.h" -#include "wx/log.h" #if __MSL__ >= 0x6000 namespace std {} @@ -1353,7 +1355,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y, return; } - if ( str.Length() == 0 ) + if ( str.length() == 0 ) return ; wxMacFastPortSetter helper(this) ; @@ -1367,9 +1369,9 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y, } OSStatus status = noErr ; ATSUTextLayout atsuLayout ; - UniCharCount chars = str.Length() ; + UniCharCount chars = str.length() ; #if wxUSE_UNICODE - status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) (const wxChar*) str , 0 , str.Length() , str.Length() , 1 , + status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) (const wxChar*) str , 0 , str.length() , str.length() , 1 , &chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ; #else wxWCharBuffer wchar = str.wc_str( wxConvLocal ) ; @@ -1458,7 +1460,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y) { ::TextMode( srcCopy ) ; } - int length = strtext.Length() ; + int length = strtext.length() ; int laststop = 0 ; int i = 0 ; @@ -1608,7 +1610,7 @@ void wxDC::DoGetTextExtent( const wxString &strtext, wxCoord *width, wxCoord *h *descent =YDEV2LOGREL( fi.descent ); if ( externalLeading ) *externalLeading = YDEV2LOGREL( fi.leading ) ; - int length = strtext.Length() ; + int length = strtext.length() ; int laststop = 0 ; int i = 0 ; @@ -1691,9 +1693,9 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con wxCHECK_MSG(Ok(), false, wxT("Invalid DC")); widths.Empty(); - widths.Add(0, text.Length()); + widths.Add(0, text.length()); - if (text.Length() == 0) + if (text.length() == 0) return false; wxMacFastPortSetter helper(this) ; @@ -1710,7 +1712,7 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con // fonts, please change it. Currently it is measuring from the // begining of the string for each succeding substring, which is much // slower than this should be. - for (size_t i=0; i