X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89efaf2b6595e59af618556d7e79492cab50c73c..37e188eaaa67c45f386845b374d2f11a250fb1a0:/src/common/graphcmn.cpp diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index 590e4a0586..4c2f0879c6 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -257,7 +257,7 @@ wxRect2DDouble wxGraphicsPath::GetBox() const return wxRect2DDouble( x,y,w,h ); } -bool wxGraphicsPath::Contains( const wxPoint2DDouble& c, int fillStyle ) const +bool wxGraphicsPath::Contains( const wxPoint2DDouble& c, wxPolygonFillMode fillStyle ) const { return Contains( c.m_x, c.m_y, fillStyle); } @@ -383,7 +383,7 @@ void wxGraphicsPath::GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) GetPathData()->GetBox(x,y,w,h); } -bool wxGraphicsPath::Contains( wxDouble x, wxDouble y, int fillStyle ) const +bool wxGraphicsPath::Contains( wxDouble x, wxDouble y, wxPolygonFillMode fillStyle ) const { return GetPathData()->Contains(x,y,fillStyle); } @@ -501,9 +501,11 @@ void wxGraphicsPathData::AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, IMPLEMENT_ABSTRACT_CLASS(wxGraphicsContext, wxObject) -wxGraphicsContext::wxGraphicsContext(wxGraphicsRenderer* renderer) : wxGraphicsObject(renderer) +wxGraphicsContext::wxGraphicsContext(wxGraphicsRenderer* renderer) : + wxGraphicsObject(renderer), + m_antialias(wxANTIALIAS_DEFAULT), + m_composition(wxCOMPOSITION_OVER) { - m_logicalFunction = wxCOPY; } wxGraphicsContext::~wxGraphicsContext() @@ -589,16 +591,6 @@ void wxGraphicsContext::SetFont( const wxGraphicsFont& font ) m_font = font; } -bool wxGraphicsContext::SetLogicalFunction( wxRasterOperationMode function ) -{ - if ( function == wxCOPY ) - { - m_logicalFunction = function; - return true; - } - return false; -} - void wxGraphicsContext::SetFont( const wxFont& font, const wxColour& colour ) { if ( font.Ok() ) @@ -607,7 +599,7 @@ void wxGraphicsContext::SetFont( const wxFont& font, const wxColour& colour ) SetFont( wxNullGraphicsFont ); } -void wxGraphicsContext::DrawPath( const wxGraphicsPath& path, int fillStyle ) +void wxGraphicsContext::DrawPath( const wxGraphicsPath& path, wxPolygonFillMode fillStyle ) { FillPath( path , fillStyle ); StrokePath( path ); @@ -722,7 +714,7 @@ void wxGraphicsContext::StrokeLines( size_t n, const wxPoint2DDouble *points) StrokePath( path ); } -void wxGraphicsContext::DrawLines( size_t n, const wxPoint2DDouble *points, int fillStyle) +void wxGraphicsContext::DrawLines( size_t n, const wxPoint2DDouble *points, wxPolygonFillMode fillStyle) { wxASSERT(n > 1); wxGraphicsPath path = CreatePath(); @@ -789,20 +781,12 @@ wxGraphicsFont wxGraphicsContext::CreateFont( const wxFont &font , const wxColou wxGraphicsBitmap wxGraphicsContext::CreateBitmap( const wxBitmap& bmp ) const { -#ifndef __WXGTK20__ return GetRenderer()->CreateBitmap(bmp); -#else - return wxNullGraphicsBitmap; -#endif } wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) const { -#ifndef __WXGTK20__ return GetRenderer()->CreateSubBitmap(bmp,x,y,w,h); -#else - return wxNullGraphicsBitmap; -#endif } /* static */ wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc)