From 669b65b94575865adc226d35a0de0dd81dde1e5f 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/trunk@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 420d5dce82..940a6960ce 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -422,12 +422,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; @@ -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 ; diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index 420d5dce82..940a6960ce 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -422,12 +422,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; @@ -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 ;