X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/28dd2407e185c8cccfd4d2f2c958e0fd91a0a989..95d8425febe48f9c1e954bce5fb9661f3cd2bea9:/src/mac/carbon/dc.cpp diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index e108c61210..78b4e4d3ec 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -418,8 +418,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 +457,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 );