two fixes from Justin Bradford

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2003-08-10 14:20:03 +00:00
parent 52a5a0098a
commit 669b65b945
2 changed files with 4 additions and 4 deletions

View 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 ;

View 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 ;