]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/dc.cpp
two fixes from Justin Bradford
[wxWidgets.git] / src / mac / dc.cpp
index 420d5dce829fc5a9f1df26b50f901f3c6d355874..940a6960ce7bb556dc5e4a4da6ba549b201dda5f 100644 (file)
@@ -422,12 +422,12 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord hei
 void wxDC::DoSetClippingRegionAsRegion( const wxRegion &region  )
 {
     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;
@@ -1883,7 +1883,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 ;