removed extraneous spaces

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Surovell
2006-01-14 06:55:06 +00:00
parent b93328d842
commit 0f4c3aa2cc

View File

@@ -76,6 +76,7 @@ wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) :
{ {
int x = 0 , y = 0; int x = 0 , y = 0;
win->MacWindowToRootWindow( &x, &y ) ; win->MacWindowToRootWindow( &x, &y ) ;
// get area including focus rect // get area including focus rect
CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion(true).GetWXHRGN() , m_newClip ) ; CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion(true).GetWXHRGN() , m_newClip ) ;
if ( !EmptyRgn( m_newClip ) ) if ( !EmptyRgn( m_newClip ) )
@@ -393,7 +394,8 @@ protected :
if ( m_image ) if ( m_image )
{ {
m_imageBounds = CGRectMake( 0.0, 0.0, (float)CGImageGetWidth( m_image ), (float)CGImageGetHeight( m_image ) ) ; m_imageBounds = CGRectMake( 0.0, 0.0, (float)CGImageGetWidth( m_image ), (float)CGImageGetHeight( m_image ) ) ;
m_patternRef = CGPatternCreate( this , m_imageBounds, transform , m_patternRef = CGPatternCreate(
this , m_imageBounds, transform ,
m_imageBounds.size.width, m_imageBounds.size.height, m_imageBounds.size.width, m_imageBounds.size.height,
kCGPatternTilingNoDistortion, true , &wxMacCGPattern::ms_Callbacks ) ; kCGPatternTilingNoDistortion, true , &wxMacCGPattern::ms_Callbacks ) ;
} }
@@ -416,7 +418,8 @@ public :
{ {
m_hatch = hatchstyle ; m_hatch = hatchstyle ;
m_imageBounds = CGRectMake( 0.0, 0.0, 8.0 , 8.0 ) ; m_imageBounds = CGRectMake( 0.0, 0.0, 8.0 , 8.0 ) ;
m_patternRef = CGPatternCreate( this , m_imageBounds, transform , m_patternRef = CGPatternCreate(
this , m_imageBounds, transform ,
m_imageBounds.size.width, m_imageBounds.size.height, m_imageBounds.size.width, m_imageBounds.size.height,
kCGPatternTilingNoDistortion, false , &wxMacCGPattern::ms_Callbacks ) ; kCGPatternTilingNoDistortion, false , &wxMacCGPattern::ms_Callbacks ) ;
} }
@@ -531,7 +534,7 @@ void wxMacCGContext::SetPen( const wxPen &pen )
bool stroke = pen.GetStyle() != wxTRANSPARENT ; bool stroke = pen.GetStyle() != wxTRANSPARENT ;
#if 0 #if 0
// we can benchmark performance, should go into a setting later // we can benchmark performance; should go into a setting eventually
CGContextSetShouldAntialias( m_cgContext , false ) ; CGContextSetShouldAntialias( m_cgContext , false ) ;
#endif #endif
@@ -545,7 +548,7 @@ void wxMacCGContext::SetPen( const wxPen &pen )
RGBColor col = MAC_WXCOLORREF( pen.GetColour().GetPixel() ) ; RGBColor col = MAC_WXCOLORREF( pen.GetColour().GetPixel() ) ;
CGContextSetRGBStrokeColor( m_cgContext , col.red / 65536.0 , col.green / 65536.0 , col.blue / 65536.0 , 1.0 ) ; CGContextSetRGBStrokeColor( m_cgContext , col.red / 65536.0 , col.green / 65536.0 , col.blue / 65536.0 , 1.0 ) ;
// TODO * m_dc->m_scaleX // TODO: * m_dc->m_scaleX
float penWidth = pen.GetWidth(); float penWidth = pen.GetWidth();
if (penWidth <= 0.0) if (penWidth <= 0.0)
penWidth = 0.1; penWidth = 0.1;
@@ -1464,7 +1467,8 @@ void wxDC::DoDrawSpline(wxList *points)
wxCoord cx4 = (x1 + x2) / 2; wxCoord cx4 = (x1 + x2) / 2;
wxCoord cy4 = (y1 + y2) / 2; wxCoord cy4 = (y1 + y2) / 2;
path->AddQuadCurveToPoint( XLOG2DEVMAC( x1 ) , XLOG2DEVMAC( y1 ) , path->AddQuadCurveToPoint(
XLOG2DEVMAC( x1 ) , XLOG2DEVMAC( y1 ) ,
XLOG2DEVMAC( cx4 ) , XLOG2DEVMAC( cy4 ) ) ; XLOG2DEVMAC( cx4 ) , XLOG2DEVMAC( cy4 ) ) ;
cx1 = cx4; cx1 = cx4;
@@ -1595,6 +1599,7 @@ void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
wxCoord yy = YLOG2DEVMAC(y); wxCoord yy = YLOG2DEVMAC(y);
wxCoord ww = m_signX * XLOG2DEVREL(width); wxCoord ww = m_signX * XLOG2DEVREL(width);
wxCoord hh = m_signY * YLOG2DEVREL(height); wxCoord hh = m_signY * YLOG2DEVREL(height);
// CMB: draw nothing if transformed w or h is 0 // CMB: draw nothing if transformed w or h is 0
if (ww == 0 || hh == 0) if (ww == 0 || hh == 0)
return; return;
@@ -1621,12 +1626,13 @@ void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
CGContextDrawPath( ctx , mctx->GetDrawingMode() ) ; CGContextDrawPath( ctx , mctx->GetDrawingMode() ) ;
} }
bool wxDC::CanDrawBitmap(void) const bool wxDC::CanDrawBitmap() const
{ {
return true ; return true ;
} }
bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, bool wxDC::DoBlit(
wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, int logical_func , bool useMask, wxDC *source, wxCoord xsrc, wxCoord ysrc, int logical_func , bool useMask,
wxCoord xsrcMask, wxCoord ysrcMask ) wxCoord xsrcMask, wxCoord ysrcMask )
{ {
@@ -1809,9 +1815,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
if ( m_backgroundMode == wxSOLID ) if ( m_backgroundMode == wxSOLID )
{ {
wxGraphicPath* path = m_graphicContext->CreatePath() ; wxGraphicPath* path = m_graphicContext->CreatePath() ;
path->MoveToPoint( path->MoveToPoint( drawX , drawY ) ;
drawX ,
drawY ) ;
path->AddLineToPoint( path->AddLineToPoint(
(int) (drawX + sin(angle / RAD2DEG) * FixedToInt(ascent + descent)) , (int) (drawX + sin(angle / RAD2DEG) * FixedToInt(ascent + descent)) ,
(int) (drawY + cos(angle / RAD2DEG) * FixedToInt(ascent + descent)) ) ; (int) (drawY + cos(angle / RAD2DEG) * FixedToInt(ascent + descent)) ) ;