X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/73bdd73aa22ef33f346937d05bfb69bc04a0e430..2943b2c6af7be72c9eddf7dbf6d5abce5ad18c07:/src/mac/carbon/dc.cpp?ds=inline diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index 420d5dce82..836279295e 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -31,6 +31,7 @@ using namespace std ; #include "ATSUnicode.h" #include "TextCommon.h" #include "TextEncodingConverter.h" +#include "FixMath.h" #if !USE_SHARED_LIBRARY IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) #endif @@ -422,12 +423,12 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord hei void wxDC::DoSetClippingRegionAsRegion( const wxRegion ®ion ) { wxCHECK_RET( Ok(), wxT("invalid window dc") ) ; - wxMacPortSetter helper(this) ; if (region.Empty()) { DestroyClippingRegion(); return; } + wxMacPortSetter helper(this) ; wxCoord x, y, w, h; region.GetBox( x, y, w, h ); wxCoord xx, yy, ww, hh; @@ -1279,6 +1280,8 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, return TRUE; } +#ifndef FixedToInt +// as macro in FixMath.h for 10.3 inline Fixed IntToFixed( int inInt ) { return (((SInt32) inInt) << 16); @@ -1288,6 +1291,7 @@ inline int FixedToInt( Fixed inFixed ) { return (((SInt32) inFixed) >> 16); } +#endif void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y, double angle) @@ -1883,7 +1887,7 @@ void wxDC::MacInstallPen() const ::RGBForeColor( &forecolor ); ::RGBBackColor( &backcolor ); ::PenNormal() ; - int penWidth = m_pen.GetWidth() * (int) m_scaleX ; + int penWidth = (int) (m_pen.GetWidth() * m_scaleX) ; ; // null means only one pixel, at whatever resolution if ( penWidth == 0 ) penWidth = 1 ;