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);
}
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);
}
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()
m_font = font;
}
-bool wxGraphicsContext::SetLogicalFunction( int function )
-{
- if ( function == wxCOPY )
- {
- m_logicalFunction = function;
- return true;
- }
- return false;
-}
-
void wxGraphicsContext::SetFont( const wxFont& font, const wxColour& colour )
{
if ( font.Ok() )
SetFont( wxNullGraphicsFont );
}
-void wxGraphicsContext::DrawPath( const wxGraphicsPath& path, int fillStyle )
+void wxGraphicsContext::DrawPath( const wxGraphicsPath& path, wxPolygonFillMode fillStyle )
{
FillPath( path , fillStyle );
StrokePath( path );
}
-void wxGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDouble y, wxDouble angle )
+void
+wxGraphicsContext::DoDrawRotatedText(const wxString &str,
+ wxDouble x,
+ wxDouble y,
+ wxDouble angle)
{
Translate(x,y);
Rotate( -angle );
Translate(-x,-y);
}
-void wxGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDouble y, const wxGraphicsBrush& backgroundBrush )
+void
+wxGraphicsContext::DoDrawFilledText(const wxString &str,
+ wxDouble x,
+ wxDouble y,
+ const wxGraphicsBrush& backgroundBrush)
{
wxGraphicsBrush formerBrush = m_brush;
wxGraphicsPen formerPen = m_pen;
SetPen( formerPen );
}
-void wxGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDouble y, wxDouble angle, const wxGraphicsBrush& backgroundBrush )
+void
+wxGraphicsContext::DoDrawRotatedFilledText(const wxString &str,
+ wxDouble x, wxDouble y,
+ wxDouble angle,
+ const wxGraphicsBrush& backgroundBrush)
{
wxGraphicsBrush formerBrush = m_brush;
wxGraphicsPen formerPen = m_pen;
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();