X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd04970ab45eb2f392af48b71aa9ecd5d4b1c8c2..3b9b80c0e25ac0ef0d162b2a8e2d8206105a485b:/src/mac/carbon/dc.cpp?ds=sidebyside diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index e3439b8aec..d1cfb0411d 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -6,7 +6,7 @@ // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -26,15 +26,19 @@ #include "wx/image.h" #include "wx/log.h" -#if __MSL__ >= 0x6000 -namespace std {} -using namespace std ; +#ifdef __MSL__ + #if __MSL__ >= 0x6000 + namespace std {} + using namespace std ; + #endif #endif #include "wx/mac/private.h" +#ifndef __DARWIN__ #include #include #include +#endif IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) @@ -365,7 +369,7 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask PixMapHandle bmappixels ; // Set foreground and background colours (for bitmaps depth = 1) if(bmp.GetDepth() == 1) - { + { RGBColor fore = MAC_WXCOLORREF(m_textForegroundColour.GetPixel()); RGBColor back = MAC_WXCOLORREF(m_textBackgroundColour.GetPixel()); RGBForeColor(&fore); @@ -1315,7 +1319,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y, UniCharCount chars = str.Length() ; UniChar* ubuf = NULL ; #if SIZEOF_WCHAR_T == 4 - wxMBConvUTF16BE converter ; + wxMBConvUTF16 converter ; #if wxUSE_UNICODE size_t unicharlen = converter.WC2MB( NULL , str.wc_str() , 0 ) ; ubuf = (UniChar*) malloc( unicharlen + 2 ) ; @@ -1666,9 +1670,9 @@ void wxDC::MacInstallFont() const Pattern whiteColor ; ::BackPat(GetQDGlobalsWhite(&whiteColor)); } - + wxASSERT( m_font.Ok() ) ; - + ::TextFont( m_font.MacGetFontNum() ) ; ::TextSize( (short)(m_scaleY * m_font.MacGetFontSize()) ) ; @@ -1745,7 +1749,7 @@ void wxDC::MacInstallFont() const atsuTags, atsuSizes, atsuValues); wxASSERT_MSG( status == noErr , wxT("couldn't Modify ATSU style") ) ; - + } Pattern gPatterns[] =