From e7cbbff330f294ba01992c52e0c6b3ebfd469d47 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 10 Aug 2003 14:20:03 +0000 Subject: [PATCH] two fixes from Justin Bradford git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@22734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dc.cpp | 4 ++-- src/mac/dc.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index 4dd96b14c2..1ad485e36f 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -424,12 +424,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; @@ -1840,7 +1840,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 ; diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index 4dd96b14c2..1ad485e36f 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -424,12 +424,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; @@ -1840,7 +1840,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 ;