]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/graphicspath.tex
Added the conversion to unspecfied_bool to all smart pointers, added T& operator...
[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 \helpref{wxObject}{wxobject}
21
22 \wxheading{Include files}
23
24 <wx/graphics.h>
25
26 \wxheading{Library}
27
28 \helpref{wxCore}{librarieslist}
29
30 \latexignore{\rtfignore{\wxheading{Members}}}
31
32 \membersection{wxGraphicsPath::MoveToPoint}\label{wxgraphicspathmovetopoint}
33
34 \func{void}{MoveToPoint}{\param{wxDouble }{x}, \param{wxDouble }{y}}
35
36 \func{void}{MoveToPoint}{\param{const wxPoint2DDouble\& }{p}}
37
38 Begins a new subpath at (x,y)
39
40 \membersection{wxGraphicsPath::AddArc}\label{wxgraphicspathaddarc}
41
42 \func{void}{AddArc}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{wxDouble }{r}, \param{wxDouble }{startAngle}, \param{wxDouble }{endAngle},
43 \param{bool }{clockwise}}
44
45 Adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle.
46
47 \func{void}{AddArc}{\param{const wxPoint2DDouble\& }{c}, \param{wxDouble }{r}, \param{wxDouble }{startAngle}, \param{wxDouble }{endAngle},
48 \param{bool }{clockwise}}
49
50 \membersection{wxGraphicsPath::AddArcToPoint}\label{wxgraphicspathaddarctopoint}
51
52 \func{void}{AddArcToPoint}{\param{wxDouble }{x1}, \param{wxDouble }{y1}, \param{wxDouble }{x2}, \param{wxDouble }{y2}, \param{wxDouble }{r}}
53
54 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).
55
56 \membersection{wxGraphicsPath::AddCircle}\label{wxgraphicspathaddcircle}
57
58 \func{void}{AddCircle}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{wxDouble }{r}}
59
60 Appends a circle around (x,y) with radius r as a new closed subpath.
61
62 \membersection{wxGraphicsPath::AddCurveToPoint}\label{wxgraphicspathaddcurvetopoint}
63
64 \func{void}{AddCurveToPoint}{\param{wxDouble }{cx1}, \param{wxDouble }{cy1}, \param{wxDouble }{cx2}, \param{wxDouble }{cy2}, \param{wxDouble }{x},
65 \param{wxDouble }{y}}
66
67 Adds a cubic Bezier curve from the current point, using two control points and an end point.
68
69 \func{void}{AddCurveToPoint}{\param{const wxPoint2DDouble\& }{c1}, \param{const wxPoint2DDouble\& }{c2}, \param{const wxPoint2DDouble\& }{e}}
70
71 \membersection{wxGraphicsPath::AddEllipse}\label{wxgraphicspathaddellipse}
72
73 \func{void}{AddEllipse}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{wxDouble }{w}, \param{wxDouble }{h}}
74
75 Appends an ellipse fitting into the passed in rectangle.
76
77 \membersection{wxGraphicsPath::AddLineToPoint}\label{wxgraphicspathaddlinetopoint}
78
79 \func{void}{AddLineToPoint}{\param{wxDouble }{x}, \param{wxDouble }{y}}
80
81 Adds a straight line from the current point to (x,y).
82
83 \func{void}{AddLineToPoint}{\param{const wxPoint2DDouble\& }{p}}
84
85 \membersection{wxGraphicsPath::AddPath}\label{wxgraphicspathaddpath}
86
87 \func{void}{AddPath}{\param{const wxGraphicsPath\& }{path}}
88
89 Adds another path.
90
91 \membersection{wxGraphicsPath::AddQuadCurveToPoint}\label{wxgraphicspathaddquadcurvetopoint}
92
93 \func{void}{AddQuadCurveToPoint}{\param{wxDouble }{cx}, \param{wxDouble }{cy}, \param{wxDouble }{x}, \param{wxDouble }{y}}
94
95 Adds a quadratic Bezier curve from the current point, using a control point and an end point.
96
97 \membersection{wxGraphicsPath::AddRectangle}\label{wxgraphicspathaddrectangle}
98
99 \func{void}{AddRectangle}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{wxDouble }{w}, \param{wxDouble }{h}}
100
101 Appends a rectangle as a new closed subpath.
102
103 \membersection{wxGraphicsPath::AddRoundedRectangle}\label{wxgraphicspathaddroundedrectangle}
104
105 \func{void}{AddRoundedRectangle}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{wxDouble }{w}, \param{wxDouble }{h}, \param{wxDouble }{radius}}
106
107 Appends a rounded rectangle as a new closed subpath.
108
109 \membersection{wxGraphicsPath::CloseSubpath}\label{wxgraphicspathclosesubpath}
110
111 \func{void}{CloseSubpath}{\void}
112
113 Closes the current sub-path.
114
115 \membersection{wxGraphicsPath::Contains}\label{wxgraphicspathcontains}
116
117 \constfunc{bool}{Contains}{\param{const wxPoint2DDouble\& }{c}, \param{int }{fillStyle = wxODDEVEN\_RULE}}
118
119 \constfunc{bool}{Contains}{\param{wxDouble }{x}, \param{wxDouble }{y}, \param{int }{fillStyle = wxODDEVEN\_RULE}}
120
121 Returns true if the point is within the path.
122
123 \membersection{wxGraphicsPath::GetBox}\label{wxgraphicspathgetbox}
124
125 \constfunc{wxRect2DDouble}{GetBox}{\void}
126
127 \constfunc{void}{GetBox}{\param{wxDouble* }{x}, \param{wxDouble* }{y}, \param{wxDouble* }{w}, \param{wxDouble* }{h}}
128
129 Gets the bounding box enclosing all points (possibly including control points).
130
131 \membersection{wxGraphicsPath::GetCurrentPoint}\label{wxgraphicspathgetcurrentpoint}
132
133 \constfunc{void}{GetCurrentPoint}{\param{wxDouble* }{x}, \param{wxDouble* }{y}}
134
135 \constfunc{wxPoint2DDouble}{GetCurrentPoint}{\void}
136
137 Gets the last point of the current path, (0,0) if not yet set.
138
139 \membersection{wxGraphicsPath::Transform}\label{wxgraphicspathtransform}
140
141 \func{void}{Transform}{\param{const wxGraphicsMatrix\& }{matrix}}
142
143 Transforms each point of this path by the matrix.
144
145 \membersection{wxGraphicsPath::GetNativePath}\label{wxgraphicspathgetnativepath}
146
147 \constfunc{void *}{GetNativePath}{\void}
148
149 Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo\_path\_t pointer for cairo).
150
151 \membersection{wxGraphicsPath::UnGetNativePath}\label{wxgraphicspathungetnativepath}
152
153 \constfunc{void}{UnGetNativePath}{\param{void* }{p}}
154
155 Gives back the native path returned by GetNativePath() because there might be some deallocations necessary (eg on cairo the native path returned by
156 GetNativePath is newly allocated each time).
157