]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/graphicspath.tex
fix typo
[wxWidgets.git] / docs / latex / wx / graphicspath.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: graphicspath.tex
3 %% Purpose: wxGraphicsPath class documentation
4 %% Author: Stefan Csomor
5 %% Modified by:
6 %% Created: 08.06.2004
7 %% RCS-ID: $Id$
8 %% Copyright: (c) Stefan Csomor
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxGraphicsPath}}\label{wxgraphicspath}
13
14 A wxGraphicsPath is a native representation of an geometric path. The contents are specific an private to the respective renderer. Instances are ref counted and can
15 therefore be assigned as usual. The only way to get a valid instance is via a CreatePath call on the graphics context or the renderer instance.
16
17 \wxheading{Derived from}
18
19 \helpref{wxGraphicsObject}{wxgraphicsobject}
20
21 \wxheading{Include files}
22
23 <wx/graphics.h>
24
25 \latexignore{\rtfignore{\wxheading{Members}}}
26
27 \membersection{wxGraphicsPath::MoveToPoint}\label{wxgraphicspathmovetopoint}
28
29 \func{void}{MoveToPoint}{\param{wxDouble }{x}, \param{wxDouble }{y}}
30
31 \func{void}{MoveToPoint}{\param{const wxPoint2DDouble\& }{p}}
32
33 Begins a new subpath at (x,y)
34
35 \membersection{wxGraphicsPath::AddArc}\label{wxgraphicspathaddarc}
36
37 \func{void}{AddArc}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{wxDouble }{r}, \param{wxDouble }{startAngle}, \param{wxDouble }{endAngle},
38 \param{bool }{clockwise}}
39
40 Adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle.
41
42 \func{void}{AddArc}{\param{const wxPoint2DDouble\& }{c}, \param{wxDouble }{r}, \param{wxDouble }{startAngle}, \param{wxDouble }{endAngle},
43 \param{bool }{clockwise}}
44
45 \membersection{wxGraphicsPath::AddArcToPoint}\label{wxgraphicspathaddarctopoint}
46
47 \func{void}{AddArcToPoint}{\param{wxDouble }{x1}, \param{wxDouble }{y1}, \param{wxDouble }{x2}, \param{wxDouble }{y2}, \param{wxDouble }{r}}
48
49 Appends a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1).
50
51 \membersection{wxGraphicsPath::AddCircle}\label{wxgraphicspathaddcircle}
52
53 \func{void}{AddCircle}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{wxDouble }{r}}
54
55 Appends a circle around (x,y) with radius r as a new closed subpath.
56
57 \membersection{wxGraphicsPath::AddCurveToPoint}\label{wxgraphicspathaddcurvetopoint}
58
59 \func{void}{AddCurveToPoint}{\param{wxDouble }{cx1}, \param{wxDouble }{cy1}, \param{wxDouble }{cx2}, \param{wxDouble }{cy2}, \param{wxDouble }{x},
60 \param{wxDouble }{y}}
61
62 Adds a cubic Bezier curve from the current point, using two control points and an end point.
63
64 \func{void}{AddCurveToPoint}{\param{const wxPoint2DDouble\& }{c1}, \param{const wxPoint2DDouble\& }{c2}, \param{const wxPoint2DDouble\& }{e}}
65
66 \membersection{wxGraphicsPath::AddEllipse}\label{wxgraphicspathaddellipse}
67
68 \func{void}{AddEllipse}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{wxDouble }{w}, \param{wxDouble }{h}}
69
70 Appends an ellipse fitting into the passed in rectangle.
71
72 \membersection{wxGraphicsPath::AddLineToPoint}\label{wxgraphicspathaddlinetopoint}
73
74 \func{void}{AddLineToPoint}{\param{wxDouble }{x}, \param{wxDouble }{y}}
75
76 Adds a straight line from the current point to (x,y).
77
78 \func{void}{AddLineToPoint}{\param{const wxPoint2DDouble\& }{p}}
79
80 \membersection{wxGraphicsPath::AddPath}\label{wxgraphicspathaddpath}
81
82 \func{void}{AddPath}{\param{const wxGraphicsPath\& }{path}}
83
84 Adds another path.
85
86 \membersection{wxGraphicsPath::AddQuadCurveToPoint}\label{wxgraphicspathaddquadcurvetopoint}
87
88 \func{void}{AddQuadCurveToPoint}{\param{wxDouble }{cx}, \param{wxDouble }{cy}, \param{wxDouble }{x}, \param{wxDouble }{y}}
89
90 Adds a quadratic Bezier curve from the current point, using a control point and an end point.
91
92 \membersection{wxGraphicsPath::AddRectangle}\label{wxgraphicspathaddrectangle}
93
94 \func{void}{AddRectangle}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{wxDouble }{w}, \param{wxDouble }{h}}
95
96 Appends a rectangle as a new closed subpath.
97
98 \membersection{wxGraphicsPath::AddRoundedRectangle}\label{wxgraphicspathaddroundedrectangle}
99
100 \func{void}{AddRoundedRectangle}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{wxDouble }{w}, \param{wxDouble }{h}, \param{wxDouble }{radius}}
101
102 Appends a rounded rectangle as a new closed subpath.
103
104 \membersection{wxGraphicsPath::CloseSubpath}\label{wxgraphicspathclosesubpath}
105
106 \func{void}{CloseSubpath}{\void}
107
108 Closes the current sub-path.
109
110 \membersection{wxGraphicsPath::Contains}\label{wxgraphicspathcontains}
111
112 \constfunc{bool}{Contains}{\param{const wxPoint2DDouble\& }{c}, \param{int }{fillStyle = wxODDEVEN\_RULE}}
113
114 \constfunc{bool}{Contains}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{int }{fillStyle = wxODDEVEN\_RULE}}
115
116 Returns true if the point is within the path.
117
118 \membersection{wxGraphicsPath::GetBox}\label{wxgraphicspathgetbox}
119
120 \constfunc{wxRect2DDouble}{GetBox}{\void}
121
122 \constfunc{void}{GetBox}{\param{wxDouble* }{x}, \param{wxDouble* }{y}, \param{wxDouble* }{w}, \param{wxDouble* }{h}}
123
124 Gets the bounding box enclosing all points (possibly including control points).
125
126 \membersection{wxGraphicsPath::GetCurrentPoint}\label{wxgraphicspathgetcurrentpoint}
127
128 \constfunc{void}{GetCurrentPoint}{\param{wxDouble* }{x}, \param{wxDouble* }{y}}
129
130 \constfunc{wxPoint2DDouble}{GetCurrentPoint}{\void}
131
132 Gets the last point of the current path, (0,0) if not yet set.
133
134 \membersection{wxGraphicsPath::Transform}\label{wxgraphicspathtransform}
135
136 \func{void}{Transform}{\param{const wxGraphicsMatrix\& }{matrix}}
137
138 Transforms each point of this path by the matrix.
139
140 \membersection{wxGraphicsPath::GetNativePath}\label{wxgraphicspathgetnativepath}
141
142 \constfunc{void *}{GetNativePath}{\void}
143
144 Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo\_path\_t pointer for cairo).
145
146 \membersection{wxGraphicsPath::UnGetNativePath}\label{wxgraphicspathungetnativepath}
147
148 \constfunc{void}{UnGetNativePath}{\param{void* }{p}}
149
150 Gives back the native path returned by GetNativePath() because there might be some deallocations necessary (eg on cairo the native path returned by
151 GetNativePath is newly allocated each time).
152