1 #############################################################################
2 ## Name: XS/GraphicsPath.xs
3 ## Purpose: XS for Wx::GraphicsPath
4 ## Author: Klaas Hartmann
7 ## RCS-ID: $Id: GraphicsPath.xs 2523 2009-02-04 23:50:57Z mbarbon $
8 ## Copyright: (c) 2007, 2009 Klaas Hartmann
9 ## Licence: This program is free software; you can redistribute it and/or
10 ## modify it under the same terms as Perl itself
11 #############################################################################
13 ## There are several overloaded functions (see below) where one variant takes a
14 ## wxPoint2DDouble and the other takes x and y values individually. In these
15 ## cases the former variant has not been implemented. Feel free to do so!
17 ## Unimplemented overloaded functions
18 ## void MoveToPoint(const wxPoint2DDouble& p)
19 ## void AddArc(const wxPoint2DDouble& c, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise)
20 ## void AddCurveToPoint(const wxPoint2DDouble& c1, const wxPoint2DDouble& c2, const wxPoint2DDouble& e)
21 ## void AddLineToPoint(const wxPoint2DDouble& p)
22 ## bool Contains(const wxPoint2DDouble& c, int fillStyle = wxODDEVEN_RULE) const
24 #if wxUSE_GRAPHICS_CONTEXT
26 #include <wx/graphics.h>
28 MODULE=Wx PACKAGE=Wx::GraphicsPath
31 wxGraphicsPath::MoveToPoint (x, y)
36 wxGraphicsPath::AddArc(x,y,r,startAngle,endAngle,clockwise )
45 wxGraphicsPath::AddArcToPoint ( x1, y1, x2, y2, r)
53 wxGraphicsPath::AddCircle ( x, y, r)
59 wxGraphicsPath::AddCurveToPoint (cx1, cy1, cx2, cy2, x, y)
68 wxGraphicsPath::AddEllipse ( x, y, w, h)
75 wxGraphicsPath::AddLineToPoint ( x, y)
80 wxGraphicsPath::AddPath (path)
86 wxGraphicsPath::AddQuadCurveToPoint (cx, cy, x, y)
93 wxGraphicsPath::AddRectangle (x, y, w, h)
100 wxGraphicsPath::AddRoundedRectangle (x, y, w, h, radius)
108 wxGraphicsPath::CloseSubpath ( )
111 wxGraphicsPath::Contains (x, y, fillStyle = wxODDEVEN_RULE)
114 wxPolygonFillMode fillStyle
117 wxGraphicsPath::GetBox ( )
121 THIS->GetBox( &x, &y, &w, &h );
123 PUSHs( sv_2mortal( newSVnv( x ) ) );
124 PUSHs( sv_2mortal( newSVnv( y ) ) );
125 PUSHs( sv_2mortal( newSVnv( w ) ) );
126 PUSHs( sv_2mortal( newSVnv( h ) ) );
129 wxGraphicsPath::GetCurrentPoint ( )
133 THIS->GetCurrentPoint( &x, &y );
135 PUSHs( sv_2mortal( newSVnv( x ) ) );
136 PUSHs( sv_2mortal( newSVnv( y ) ) );
139 wxGraphicsPath::Transform (matrix)
140 wxGraphicsMatrix* matrix
142 THIS->Transform( *matrix );