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

@@ -62,9 +62,9 @@ extern TECObjectRef s_TECNativeCToUnicode ;
// The textctrl implementation still needs that (needs what?) for the non-HIView implementation
//
wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) :
wxMacPortSaver( (GrafPtr) GetWindowPort((WindowRef) win->MacGetTopLevelWindowRef()) )
wxMacPortSaver( (GrafPtr) GetWindowPort( (WindowRef) win->MacGetTopLevelWindowRef() ) )
{
m_newPort = (GrafPtr) GetWindowPort((WindowRef) win->MacGetTopLevelWindowRef()) ;
m_newPort = (GrafPtr) GetWindowPort( (WindowRef) win->MacGetTopLevelWindowRef() ) ;
m_formerClip = NewRgn() ;
m_newClip = NewRgn() ;
GetClip( m_formerClip ) ;
@@ -76,6 +76,7 @@ wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) :
{
int x = 0 , y = 0;
win->MacWindowToRootWindow( &x, &y ) ;
// get area including focus rect
CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion(true).GetWXHRGN() , m_newClip ) ;
if ( !EmptyRgn( m_newClip ) )
@@ -98,7 +99,7 @@ wxMacWindowStateSaver::wxMacWindowStateSaver( const wxWindow* win ) :
wxMacWindowClipper( win )
{
// the port is already set at this point
m_newPort = (GrafPtr) GetWindowPort((WindowRef) win->MacGetTopLevelWindowRef()) ;
m_newPort = (GrafPtr) GetWindowPort( (WindowRef) win->MacGetTopLevelWindowRef() ) ;
GetThemeDrawingState( &m_themeDrawingState ) ;
}
@@ -393,7 +394,8 @@ protected :
if ( 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,
kCGPatternTilingNoDistortion, true , &wxMacCGPattern::ms_Callbacks ) ;
}
@@ -416,7 +418,8 @@ public :
{
m_hatch = hatchstyle ;
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,
kCGPatternTilingNoDistortion, false , &wxMacCGPattern::ms_Callbacks ) ;
}
@@ -517,7 +520,7 @@ protected :
CGRect m_imageBounds ;
int m_hatch ;
} ;
};
#pragma mark -
@@ -531,7 +534,7 @@ void wxMacCGContext::SetPen( const wxPen &pen )
bool stroke = pen.GetStyle() != wxTRANSPARENT ;
#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 ) ;
#endif
@@ -545,7 +548,7 @@ void wxMacCGContext::SetPen( const wxPen &pen )
RGBColor col = MAC_WXCOLORREF( pen.GetColour().GetPixel() ) ;
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();
if (penWidth <= 0.0)
penWidth = 0.1;
@@ -1090,7 +1093,7 @@ wxSize wxDC::GetPPI() const
int wxDC::GetDepth() const
{
return 32 ;
return 32;
}
void wxDC::ComputeScaleAndOrigin()
@@ -1111,7 +1114,7 @@ void wxDC::ComputeScaleAndOrigin()
wxPen pen( GetPen() );
m_pen = wxNullPen;
SetPen(pen);
SetPen( pen );
}
}
@@ -1147,8 +1150,8 @@ void wxDC::SetPen( const wxPen &pen )
// we have to compensate for moved device origins etc. otherwise patterned pens are standing still
// eg when using a wxScrollWindow and scrolling around
CGContextRef cgContext = ((wxMacCGContext*)(m_graphicContext))->GetNativeContext() ;
int origX = XLOG2DEVMAC(0) ;
int origY = YLOG2DEVMAC(0) ;
int origX = XLOG2DEVMAC( 0 ) ;
int origY = YLOG2DEVMAC( 0 ) ;
CGContextTranslateCTM( cgContext, origX, origY );
m_graphicContext->SetPen( m_pen ) ;
CGContextTranslateCTM( cgContext, -origX, -origY );
@@ -1378,7 +1381,7 @@ void wxDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
CGContextScaleCTM( ctx , 1 * ww / 2 , -1 * hh / 2 ) ;
if ( fill )
CGContextMoveToPoint( ctx , 0 , 0 ) ;
CGContextAddArc( ctx, 0, 0, 1, DegToRad(sa), DegToRad(ea), 0 );
CGContextAddArc( ctx, 0, 0, 1, DegToRad( sa ), DegToRad( ea ), 0 );
if ( fill )
CGContextAddLineToPoint( ctx , 0 , 0 ) ;
CGContextRestoreGState( ctx ) ;
@@ -1464,7 +1467,8 @@ void wxDC::DoDrawSpline(wxList *points)
wxCoord cx4 = (x1 + x2) / 2;
wxCoord cy4 = (y1 + y2) / 2;
path->AddQuadCurveToPoint( XLOG2DEVMAC( x1 ) , XLOG2DEVMAC( y1 ) ,
path->AddQuadCurveToPoint(
XLOG2DEVMAC( x1 ) , XLOG2DEVMAC( y1 ) ,
XLOG2DEVMAC( cx4 ) , XLOG2DEVMAC( cy4 ) ) ;
cx1 = cx4;
@@ -1595,6 +1599,7 @@ void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
wxCoord yy = YLOG2DEVMAC(y);
wxCoord ww = m_signX * XLOG2DEVREL(width);
wxCoord hh = m_signY * YLOG2DEVREL(height);
// CMB: draw nothing if transformed w or h is 0
if (ww == 0 || hh == 0)
return;
@@ -1621,12 +1626,13 @@ void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
CGContextDrawPath( ctx , mctx->GetDrawingMode() ) ;
}
bool wxDC::CanDrawBitmap(void) const
bool wxDC::CanDrawBitmap() const
{
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,
wxCoord xsrcMask, wxCoord ysrcMask )
{
@@ -1809,9 +1815,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
if ( m_backgroundMode == wxSOLID )
{
wxGraphicPath* path = m_graphicContext->CreatePath() ;
path->MoveToPoint(
drawX ,
drawY ) ;
path->MoveToPoint( drawX , drawY ) ;
path->AddLineToPoint(
(int) (drawX + sin(angle / RAD2DEG) * FixedToInt(ascent + descent)) ,
(int) (drawY + cos(angle / RAD2DEG) * FixedToInt(ascent + descent)) ) ;