File: GraphicsPath.xs

package info (click to toggle)
libwx-perl 1%3A0.9909-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,912 kB
  • sloc: cpp: 9,728; perl: 8,182; ansic: 626; makefile: 41
file content (144 lines) | stat: -rw-r--r-- 3,418 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#############################################################################
## Name:        XS/GraphicsPath.xs
## Purpose:     XS for Wx::GraphicsPath
## Author:      Klaas Hartmann
## Modified by:
## Created:     29/06/2007
## RCS-ID:      $Id: GraphicsPath.xs 2523 2009-02-04 23:50:57Z mbarbon $
## Copyright:   (c) 2007, 2009 Klaas Hartmann
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

## There are several overloaded functions (see below) where one variant takes a 
## wxPoint2DDouble and the other takes x and y values individually. In these
## cases the former variant has not been implemented.  Feel free to do so!
##
## Unimplemented overloaded functions
## void MoveToPoint(const wxPoint2DDouble& p)
## void AddArc(const wxPoint2DDouble& c, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise)
## void AddCurveToPoint(const wxPoint2DDouble& c1, const wxPoint2DDouble& c2, const wxPoint2DDouble& e)
## void AddLineToPoint(const wxPoint2DDouble& p)
## bool Contains(const wxPoint2DDouble& c, int fillStyle = wxODDEVEN_RULE) const

#if wxUSE_GRAPHICS_CONTEXT

#include <wx/graphics.h>

MODULE=Wx PACKAGE=Wx::GraphicsPath

void
wxGraphicsPath::MoveToPoint (x, y)
    wxDouble x
    wxDouble y

void
wxGraphicsPath::AddArc(x,y,r,startAngle,endAngle,clockwise )
    wxDouble x
    wxDouble y
    wxDouble r
    wxDouble startAngle
    wxDouble endAngle
    bool clockwise

void
wxGraphicsPath::AddArcToPoint ( x1, y1, x2, y2, r)
    wxDouble x1
    wxDouble y1
    wxDouble x2
    wxDouble y2
    wxDouble r 

void 
wxGraphicsPath::AddCircle ( x, y, r)
    wxDouble x
    wxDouble y
    wxDouble r

void 
wxGraphicsPath::AddCurveToPoint (cx1, cy1, cx2, cy2, x, y)
    wxDouble cx1
    wxDouble cy1
    wxDouble cx2
    wxDouble cy2
    wxDouble x
    wxDouble y

void 
wxGraphicsPath::AddEllipse ( x, y, w, h)
    wxDouble x
    wxDouble y
    wxDouble w
    wxDouble h

void 
wxGraphicsPath::AddLineToPoint ( x, y)
    wxDouble x
    wxDouble y

void 
wxGraphicsPath::AddPath (path)
    wxGraphicsPath* path
  CODE:
    THIS->AddPath(*path);

void 
wxGraphicsPath::AddQuadCurveToPoint (cx, cy, x, y)
    wxDouble cx
    wxDouble cy
    wxDouble x
    wxDouble y

void
wxGraphicsPath::AddRectangle (x, y, w, h)
    wxDouble x
    wxDouble y
    wxDouble w 
    wxDouble h

void 
wxGraphicsPath::AddRoundedRectangle (x, y, w, h, radius)
    wxDouble x
    wxDouble y
    wxDouble w
    wxDouble h
    wxDouble radius

void 
wxGraphicsPath::CloseSubpath ( )

bool
wxGraphicsPath::Contains (x, y, fillStyle = wxODDEVEN_RULE)
    wxDouble x
    wxDouble y
    wxPolygonFillMode fillStyle

void
wxGraphicsPath::GetBox ( )
  PREINIT:
    wxDouble x, y, w, h;
  PPCODE:
    THIS->GetBox( &x, &y, &w, &h );
    EXTEND( SP, 4 );
    PUSHs( sv_2mortal( newSVnv( x ) ) );
    PUSHs( sv_2mortal( newSVnv( y ) ) );
    PUSHs( sv_2mortal( newSVnv( w ) ) );
    PUSHs( sv_2mortal( newSVnv( h ) ) );

void
wxGraphicsPath::GetCurrentPoint ( )
  PREINIT:
    wxDouble x, y;
  PPCODE:
    THIS->GetCurrentPoint( &x, &y );
    EXTEND( SP, 2 );
    PUSHs( sv_2mortal( newSVnv( x ) ) );
    PUSHs( sv_2mortal( newSVnv( y ) ) );

void
wxGraphicsPath::Transform (matrix)
    wxGraphicsMatrix* matrix
  CODE:
    THIS->Transform( *matrix );

#endif