X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/28dd2407e185c8cccfd4d2f2c958e0fd91a0a989..5f7348ce627157e21bec507623ebd31c1e9dc762:/src/mac/carbon/dc.cpp diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index e108c61210..31ace9896a 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -35,9 +35,8 @@ using namespace std ; #include #include #include -#if !USE_SHARED_LIBRARY + IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) -#endif //----------------------------------------------------------------------------- // constants @@ -418,8 +417,12 @@ void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ) wxCoord xx = XLOG2DEVMAC(x); wxCoord yy = YLOG2DEVMAC(y); + wxCoord w = icon.GetWidth(); + wxCoord h = icon.GetHeight(); + wxCoord ww = XLOG2DEVREL(w); + wxCoord hh = YLOG2DEVREL(h); - Rect r = { yy , xx, yy + 32 , xx + 32 } ; + Rect r = { yy , xx, yy + hh , xx + ww } ; PlotIconRef( &r , kAlignNone , kTransformNone , kPlotIconRefNormalFlags , MAC_WXHICON( icon.GetHICON() ) ) ; } @@ -453,11 +456,6 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord hei void wxDC::DoSetClippingRegionAsRegion( const wxRegion ®ion ) { wxCHECK_RET( Ok(), wxT("invalid window dc") ) ; - if (region.Empty()) - { - DestroyClippingRegion(); - return; - } wxMacFastPortSetter helper(this) ; wxCoord x, y, w, h; region.GetBox( x, y, w, h ); @@ -1317,7 +1315,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 ) ;