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