1wxGraphicsPath(3)          Erlang Module Definition          wxGraphicsPath(3)
2
3
4

NAME

6       wxGraphicsPath - Functions for wxGraphicsPath class
7

DESCRIPTION

9       A  wxGraphicsPath  is  a native representation of a geometric path. The
10       contents are specific and private to the respective renderer. Instances
11       are  reference counted and can therefore be assigned as usual. The only
12       way to get a valid instance is by using  wxGraphicsContext:createPath/1
13       or wxGraphicsRenderer:createPath/1.
14
15       This class is derived (and can use functions) from: wxGraphicsObject
16
17       wxWidgets docs: wxGraphicsPath
18

DATA TYPES

20       wxGraphicsPath() = wx:wx_object()
21

EXPORTS

23       moveToPoint(This, P) -> ok
24
25              Types:
26
27                 This = wxGraphicsPath()
28                 P = {X :: float(), Y :: float()}
29
30              Begins a new subpath at p.
31
32       moveToPoint(This, X, Y) -> ok
33
34              Types:
35
36                 This = wxGraphicsPath()
37                 X = Y = number()
38
39              Begins a new subpath at (x,y).
40
41       addArc(This, C, R, StartAngle, EndAngle, Clockwise) -> ok
42
43              Types:
44
45                 This = wxGraphicsPath()
46                 C = {X :: float(), Y :: float()}
47                 R = StartAngle = EndAngle = number()
48                 Clockwise = boolean()
49
50       addArc(This, X, Y, R, StartAngle, EndAngle, Clockwise) -> ok
51
52              Types:
53
54                 This = wxGraphicsPath()
55                 X = Y = R = StartAngle = EndAngle = number()
56                 Clockwise = boolean()
57
58              Adds an arc of a circle.
59
60              The circle is defined by the coordinates of its centre (x, y) or
61              c and its radius r. The arc goes from the starting  angle  star‐
62              tAngle to endAngle either clockwise or counter-clockwise depend‐
63              ing on the value of clockwise argument.
64
65              The angles are measured in radians but, contrary  to  the  usual
66              mathematical  convention, are always clockwise from the horizon‐
67              tal axis.
68
69              If for clockwise arc endAngle is less than startAngle it will be
70              progressively  increased  by 2*pi until it is greater than star‐
71              tAngle. If for counter-clockwise arc endAngle  is  greater  than
72              startAngle  it  will be progressively decreased by 2*pi until it
73              is less than startAngle.
74
75              If there is a current point set, an initial line segment will be
76              added  to the path to connect the current point to the beginning
77              of the arc.
78
79       addArcToPoint(This, X1, Y1, X2, Y2, R) -> ok
80
81              Types:
82
83                 This = wxGraphicsPath()
84                 X1 = Y1 = X2 = Y2 = R = number()
85
86              Adds an arc (of a circle with radius r) that is tangent  to  the
87              line  connecting current point and (x1, y1) and to the line con‐
88              necting (x1, y1) and (x2, y2).
89
90              If the current point and the starting point of the arc are  dif‐
91              ferent,  a  straight  line  connecting  these points is also ap‐
92              pended. If there is no current point before the call to  addArc‐
93              ToPoint/6  this function will behave as if preceded by a call to
94              MoveToPoint(0, 0). After this call the current point will be  at
95              the ending point of the arc.
96
97       addCircle(This, X, Y, R) -> ok
98
99              Types:
100
101                 This = wxGraphicsPath()
102                 X = Y = R = number()
103
104              Appends a circle around (x,y) with radius r as a new closed sub‐
105              path.
106
107              After this call the current point will be at (x+r, y).
108
109       addCurveToPoint(This, C1, C2, E) -> ok
110
111              Types:
112
113                 This = wxGraphicsPath()
114                 C1 = C2 = E = {X :: float(), Y :: float()}
115
116              Adds a cubic bezier curve from the current point, using two con‐
117              trol points and an end point.
118
119              If  there  is  no  current  point before the call to addCurveTo‐
120              Point/7 this function will behave as if preceded by  a  call  to
121              MoveToPoint(c1).
122
123       addCurveToPoint(This, Cx1, Cy1, Cx2, Cy2, X, Y) -> ok
124
125              Types:
126
127                 This = wxGraphicsPath()
128                 Cx1 = Cy1 = Cx2 = Cy2 = X = Y = number()
129
130              Adds a cubic bezier curve from the current point, using two con‐
131              trol points and an end point.
132
133              If there is no current point  before  the  call  to  addCurveTo‐
134              Point/7  this  function  will behave as if preceded by a call to
135              MoveToPoint(cx1, cy1).
136
137       addEllipse(This, X, Y, W, H) -> ok
138
139              Types:
140
141                 This = wxGraphicsPath()
142                 X = Y = W = H = number()
143
144              Appends an ellipse fitting into the passed in rectangle as a new
145              closed subpath.
146
147              After this call the current point will be at (x+w, y+h/2).
148
149       addLineToPoint(This, P) -> ok
150
151              Types:
152
153                 This = wxGraphicsPath()
154                 P = {X :: float(), Y :: float()}
155
156              Adds a straight line from the current point to p.
157
158              If  current  point  is not yet set before the call to addLineTo‐
159              Point/3 this function will behave as moveToPoint/3.
160
161       addLineToPoint(This, X, Y) -> ok
162
163              Types:
164
165                 This = wxGraphicsPath()
166                 X = Y = number()
167
168              Adds a straight line from the current point to (x,y).
169
170              If current point is not yet set before the  call  to  addLineTo‐
171              Point/3 this function will behave as moveToPoint/3.
172
173       addPath(This, Path) -> ok
174
175              Types:
176
177                 This = Path = wxGraphicsPath()
178
179              Adds another path onto the current path.
180
181              After  this  call  the current point will be at the added path's
182              current point. For Direct2D the path  being  appended  shouldn't
183              contain  a  started  non-empty  subpath  when  this  function is
184              called.
185
186       addQuadCurveToPoint(This, Cx, Cy, X, Y) -> ok
187
188              Types:
189
190                 This = wxGraphicsPath()
191                 Cx = Cy = X = Y = number()
192
193              Adds a quadratic bezier curve from the current  point,  using  a
194              control point and an end point.
195
196              If  there is no current point before the call to addQuadCurveTo‐
197              Point/5 this function will behave as if preceded by  a  call  to
198              MoveToPoint(cx, cy).
199
200       addRectangle(This, X, Y, W, H) -> ok
201
202              Types:
203
204                 This = wxGraphicsPath()
205                 X = Y = W = H = number()
206
207              Appends a rectangle as a new closed subpath.
208
209              After this call the current point will be at (x, y).
210
211       addRoundedRectangle(This, X, Y, W, H, Radius) -> ok
212
213              Types:
214
215                 This = wxGraphicsPath()
216                 X = Y = W = H = Radius = number()
217
218              Appends a rounded rectangle as a new closed subpath.
219
220              If  radius equals 0 this function will behave as addRectangle/5,
221              otherwise after this call the current point  will  be  at  (x+w,
222              y+h/2).
223
224       closeSubpath(This) -> ok
225
226              Types:
227
228                 This = wxGraphicsPath()
229
230              Closes the current sub-path.
231
232              After this call the current point will be at the joined endpoint
233              of the sub-path.
234
235       contains(This, C) -> boolean()
236
237              Types:
238
239                 This = wxGraphicsPath()
240                 C = {X :: float(), Y :: float()}
241
242       contains(This, X, Y) -> boolean()
243
244       contains(This, C, Y :: [Option]) -> boolean()
245
246              Types:
247
248                 This = wxGraphicsPath()
249                 C = {X :: float(), Y :: float()}
250                 Option = {fillStyle, wx:wx_enum()}
251
252              Return: true if the point is within the path.
253
254       contains(This, X, Y, Options :: [Option]) -> boolean()
255
256              Types:
257
258                 This = wxGraphicsPath()
259                 X = Y = number()
260                 Option = {fillStyle, wx:wx_enum()}
261
262              Return: true if the point is within the path.
263
264       getBox(This) ->
265                 {X :: float(), Y :: float(), W :: float(), H :: float()}
266
267              Types:
268
269                 This = wxGraphicsPath()
270
271              Gets the bounding box enclosing all points  (possibly  including
272              control points).
273
274       getCurrentPoint(This) -> {X :: float(), Y :: float()}
275
276              Types:
277
278                 This = wxGraphicsPath()
279
280              Gets the last point of the current path, (0,0) if not yet set.
281
282       transform(This, Matrix) -> ok
283
284              Types:
285
286                 This = wxGraphicsPath()
287                 Matrix = wxGraphicsMatrix:wxGraphicsMatrix()
288
289              Transforms each point of this path by the matrix.
290
291              For  Direct2D  the current path shouldn't contain a started non-
292              empty subpath when this function is called.
293
294
295
296wxWidgets team.                    wx 2.2.1                  wxGraphicsPath(3)
Impressum