summaryrefslogtreecommitdiff
path: root/lib/wx/doc/src/wxGraphicsPath.xml
blob: 54ae8031793073b4a7f129be1f6ba9b3fbf4603d (plain)
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year><year>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxGraphicsPath</title>
</header>
<module>wxGraphicsPath</module>
<modulesummary>Functions for wxGraphicsPath class</modulesummary>
<description><p>A <seeerl marker="wxGraphicsPath"><c>wxGraphicsPath</c></seeerl> is a native representation of a geometric path. The contents are specific and private to the respective renderer. Instances are reference counted and can therefore be assigned as usual. The only way to get a valid instance is by using <seemfa marker="wxGraphicsContext#createPath/1"><c>wxGraphicsContext:createPath/1</c></seemfa> or <seemfa marker="wxGraphicsRenderer#createPath/1"><c>wxGraphicsRenderer:createPath/1</c></seemfa>.
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxGraphicsObject"><c>wxGraphicsObject</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_graphics_path.html">wxGraphicsPath</url></p>
  </description>
<datatypes><datatype><name name="wxGraphicsPath"/></datatype></datatypes>

<funcs>
  <func>
    <name name="moveToPoint" arity="2" clause_i="1" since=""/>
    <fsummary>Begins a new subpath at <c>p</c>. </fsummary>
    <desc><p>Begins a new subpath at <c>p</c>. 
      </p></desc>
  </func>
  
  <func>
    <name name="moveToPoint" arity="3" clause_i="1" since=""/>
    <fsummary>Begins a new subpath at (<c>x</c>,<c>y</c>). </fsummary>
    <desc><p>Begins a new subpath at (<c>x</c>,<c>y</c>). 
      </p></desc>
  </func>
  
  <func>
    <name name="addArc" arity="6" clause_i="1" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="addArc" arity="7" clause_i="1" since=""/>
    <fsummary>Adds an arc of a circle. </fsummary>
    <desc><p>Adds an arc of a circle. 
      </p><p>The circle is defined by the coordinates of its centre (<c>x</c>, <c>y</c>) or <c>c</c> and its radius <c>r</c>. The arc goes from the starting angle <c>startAngle</c> to <c>endAngle</c> either clockwise or counter-clockwise depending on the value of <c>clockwise</c> argument.
      </p><p>The angles are measured in radians but, contrary to the usual mathematical convention, are always <c>clockwise</c> from the horizontal axis.
      </p><p>If for clockwise arc <c>endAngle</c> is less than <c>startAngle</c> it will be progressively increased by 2*pi until it is greater than <c>startAngle</c>. If for counter-clockwise arc <c>endAngle</c> is greater than <c>startAngle</c> it will be progressively decreased by 2*pi until it is less than <c>startAngle</c>.
      </p><p>If there is a current point set, an initial line segment will be added to the path to connect the current point to the beginning of the arc. 
      </p></desc>
  </func>
  
  <func>
    <name name="addArcToPoint" arity="6" clause_i="1" since=""/>
    <fsummary>Adds an arc (of a circle with radius <c>r</c>) that is tangent to the line connecting current point and (<c>x1</c>, <c>y1</c>) and to the line connecting (<c>x1</c>, <c>y1</c>) and (<c>x2</c>, <c>y2</c>). </fsummary>
    <desc><p>Adds an arc (of a circle with radius <c>r</c>) that is tangent to the line connecting current point and (<c>x1</c>, <c>y1</c>) and to the line connecting (<c>x1</c>, <c>y1</c>) and (<c>x2</c>, <c>y2</c>). 
      </p><p>If the current point and the starting point of the arc are different, a straight line connecting these points is also appended. If there is no current point before the call to <seemfa marker="#addArcToPoint/6"><c>addArcToPoint/6</c></seemfa> this function will behave as if preceded by a call to MoveToPoint(0, 0). After this call the current point will be at the ending point of the arc. 
      </p></desc>
  </func>
  
  <func>
    <name name="addCircle" arity="4" clause_i="1" since=""/>
    <fsummary>Appends a circle around (<c>x</c>,<c>y</c>) with radius <c>r</c> as a new closed subpath. </fsummary>
    <desc><p>Appends a circle around (<c>x</c>,<c>y</c>) with radius <c>r</c> as a new closed subpath. 
      </p><p>After this call the current point will be at (x+<c>r</c>, <c>y</c>). 
      </p></desc>
  </func>
  
  <func>
    <name name="addCurveToPoint" arity="4" clause_i="1" since=""/>
    <fsummary>Adds a cubic bezier curve from the current point, using two control points and an end point. </fsummary>
    <desc><p>Adds a cubic bezier curve from the current point, using two control points and an end point. 
      </p><p>If there is no current point before the call to <seemfa marker="#addCurveToPoint/7"><c>addCurveToPoint/7</c></seemfa> this function will behave as if preceded by a call to MoveToPoint(<c>c1</c>). 
      </p></desc>
  </func>
  
  <func>
    <name name="addCurveToPoint" arity="7" clause_i="1" since=""/>
    <fsummary>Adds a cubic bezier curve from the current point, using two control points and an end point. </fsummary>
    <desc><p>Adds a cubic bezier curve from the current point, using two control points and an end point. 
      </p><p>If there is no current point before the call to <seemfa marker="#addCurveToPoint/7"><c>addCurveToPoint/7</c></seemfa> this function will behave as if preceded by a call to MoveToPoint(<c>cx1</c>, <c>cy1</c>). 
      </p></desc>
  </func>
  
  <func>
    <name name="addEllipse" arity="5" clause_i="1" since=""/>
    <fsummary>Appends an ellipse fitting into the passed in rectangle as a new closed subpath. </fsummary>
    <desc><p>Appends an ellipse fitting into the passed in rectangle as a new closed subpath. 
      </p><p>After this call the current point will be at (x+<c>w</c>, y+<c>h/2</c>). 
      </p></desc>
  </func>
  
  <func>
    <name name="addLineToPoint" arity="2" clause_i="1" since=""/>
    <fsummary>Adds a straight line from the current point to <c>p</c>. </fsummary>
    <desc><p>Adds a straight line from the current point to <c>p</c>. 
      </p><p>If current point is not yet set before the call to <seemfa marker="#addLineToPoint/3"><c>addLineToPoint/3</c></seemfa> this function will behave as <seemfa marker="#moveToPoint/3"><c>moveToPoint/3</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="addLineToPoint" arity="3" clause_i="1" since=""/>
    <fsummary>Adds a straight line from the current point to (<c>x</c>,<c>y</c>). </fsummary>
    <desc><p>Adds a straight line from the current point to (<c>x</c>,<c>y</c>). 
      </p><p>If current point is not yet set before the call to <seemfa marker="#addLineToPoint/3"><c>addLineToPoint/3</c></seemfa> this function will behave as <seemfa marker="#moveToPoint/3"><c>moveToPoint/3</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="addPath" arity="2" clause_i="1" since=""/>
    <fsummary>Adds another path onto the current path. </fsummary>
    <desc><p>Adds another path onto the current path. 
      </p><p>After this call the current point will be at the added path's current point. For Direct2D the path being appended shouldn't contain a started non-empty subpath when this function is called. 
      </p></desc>
  </func>
  
  <func>
    <name name="addQuadCurveToPoint" arity="5" clause_i="1" since=""/>
    <fsummary>Adds a quadratic bezier curve from the current point, using a control point and an end point. </fsummary>
    <desc><p>Adds a quadratic bezier curve from the current point, using a control point and an end point. 
      </p><p>If there is no current point before the call to <seemfa marker="#addQuadCurveToPoint/5"><c>addQuadCurveToPoint/5</c></seemfa> this function will behave as if preceded by a call to MoveToPoint(<c>cx</c>, <c>cy</c>). 
      </p></desc>
  </func>
  
  <func>
    <name name="addRectangle" arity="5" clause_i="1" since=""/>
    <fsummary>Appends a rectangle as a new closed subpath. </fsummary>
    <desc><p>Appends a rectangle as a new closed subpath. 
      </p><p>After this call the current point will be at (<c>x</c>, <c>y</c>). 
      </p></desc>
  </func>
  
  <func>
    <name name="addRoundedRectangle" arity="6" clause_i="1" since=""/>
    <fsummary>Appends a rounded rectangle as a new closed subpath. </fsummary>
    <desc><p>Appends a rounded rectangle as a new closed subpath. 
      </p><p>If <c>radius</c> equals 0 this function will behave as <seemfa marker="#addRectangle/5"><c>addRectangle/5</c></seemfa>, otherwise after this call the current point will be at (x+<c>w</c>, y+<c>h/2</c>). 
      </p></desc>
  </func>
  
  <func>
    <name name="closeSubpath" arity="1" clause_i="1" since=""/>
    <fsummary>Closes the current sub-path. </fsummary>
    <desc><p>Closes the current sub-path. 
      </p><p>After this call the current point will be at the joined endpoint of the sub-path. 
      </p></desc>
  </func>
  
  <func>
    <name name="contains" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>contains/3</c></fsummary>
  </func>
  
  <func>
    <name name="contains" arity="3" clause_i="1" since=""/>
  
    <name name="contains" arity="3" clause_i="2" since=""/>
    <fsummary/>
    <desc><p>Return: true if the point is within the path. 
      </p></desc>
  </func>
  
  <func>
    <name name="contains" arity="4" clause_i="1" since=""/>
    <fsummary/>
    <desc><p>Return: true if the point is within the path. 
      </p></desc>
  </func>
  
  <func>
    <name name="getBox" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the bounding box enclosing all points (possibly including control points). </fsummary>
    <desc><p>Gets the bounding box enclosing all points (possibly including control points). 
      </p></desc>
  </func>
  
  <func>
    <name name="getCurrentPoint" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the last point of the current path, (0,0) if not yet set. </fsummary>
    <desc><p>Gets the last point of the current path, (0,0) if not yet set. 
      </p></desc>
  </func>
  
  <func>
    <name name="transform" arity="2" clause_i="1" since=""/>
    <fsummary>Transforms each point of this path by the matrix. </fsummary>
    <desc><p>Transforms each point of this path by the matrix. 
      </p><p>For Direct2D the current path shouldn't contain a started non-empty subpath when this function is called. 
      </p></desc>
  </func>
  </funcs>
</erlref>