1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: graphicspath.tex
3 %% Purpose: wxGraphicsPath class documentation
4 %% Author: Stefan Csomor
8 %% Copyright: (c) Stefan Csomor
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxGraphicsPath
}}\label{wxgraphicspath
}
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.
17 \wxheading{Derived from
}
19 \helpref{wxGraphicsObject
}{wxgraphicsobject
}
21 \wxheading{Include files
}
27 \helpref{wxCore
}{librarieslist
}
29 \latexignore{\rtfignore{\wxheading{Members
}}}
31 \membersection{wxGraphicsPath::MoveToPoint
}\label{wxgraphicspathmovetopoint
}
33 \func{void
}{MoveToPoint
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
}}
35 \func{void
}{MoveToPoint
}{\param{const wxPoint2DDouble\&
}{p
}}
37 Begins a new subpath at (x,y)
39 \membersection{wxGraphicsPath::AddArc
}\label{wxgraphicspathaddarc
}
41 \func{void
}{AddArc
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{wxDouble
}{r
},
\param{wxDouble
}{startAngle
},
\param{wxDouble
}{endAngle
},
42 \param{bool
}{clockwise
}}
44 Adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle.
46 \func{void
}{AddArc
}{\param{const wxPoint2DDouble\&
}{c
},
\param{wxDouble
}{r
},
\param{wxDouble
}{startAngle
},
\param{wxDouble
}{endAngle
},
47 \param{bool
}{clockwise
}}
49 \membersection{wxGraphicsPath::AddArcToPoint
}\label{wxgraphicspathaddarctopoint
}
51 \func{void
}{AddArcToPoint
}{\param{wxDouble
}{x1
},
\param{wxDouble
}{y1
},
\param{wxDouble
}{x2
},
\param{wxDouble
}{y2
},
\param{wxDouble
}{r
}}
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).
55 \membersection{wxGraphicsPath::AddCircle
}\label{wxgraphicspathaddcircle
}
57 \func{void
}{AddCircle
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{wxDouble
}{r
}}
59 Appends a circle around (x,y) with radius r as a new closed subpath.
61 \membersection{wxGraphicsPath::AddCurveToPoint
}\label{wxgraphicspathaddcurvetopoint
}
63 \func{void
}{AddCurveToPoint
}{\param{wxDouble
}{cx1
},
\param{wxDouble
}{cy1
},
\param{wxDouble
}{cx2
},
\param{wxDouble
}{cy2
},
\param{wxDouble
}{x
},
66 Adds a cubic Bezier curve from the current point, using two control points and an end point.
68 \func{void
}{AddCurveToPoint
}{\param{const wxPoint2DDouble\&
}{c1
},
\param{const wxPoint2DDouble\&
}{c2
},
\param{const wxPoint2DDouble\&
}{e
}}
70 \membersection{wxGraphicsPath::AddEllipse
}\label{wxgraphicspathaddellipse
}
72 \func{void
}{AddEllipse
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{wxDouble
}{w
},
\param{wxDouble
}{h
}}
74 Appends an ellipse fitting into the passed in rectangle.
76 \membersection{wxGraphicsPath::AddLineToPoint
}\label{wxgraphicspathaddlinetopoint
}
78 \func{void
}{AddLineToPoint
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
}}
80 Adds a straight line from the current point to (x,y).
82 \func{void
}{AddLineToPoint
}{\param{const wxPoint2DDouble\&
}{p
}}
84 \membersection{wxGraphicsPath::AddPath
}\label{wxgraphicspathaddpath
}
86 \func{void
}{AddPath
}{\param{const wxGraphicsPath\&
}{path
}}
90 \membersection{wxGraphicsPath::AddQuadCurveToPoint
}\label{wxgraphicspathaddquadcurvetopoint
}
92 \func{void
}{AddQuadCurveToPoint
}{\param{wxDouble
}{cx
},
\param{wxDouble
}{cy
},
\param{wxDouble
}{x
},
\param{wxDouble
}{y
}}
94 Adds a quadratic Bezier curve from the current point, using a control point and an end point.
96 \membersection{wxGraphicsPath::AddRectangle
}\label{wxgraphicspathaddrectangle
}
98 \func{void
}{AddRectangle
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{wxDouble
}{w
},
\param{wxDouble
}{h
}}
100 Appends a rectangle as a new closed subpath.
102 \membersection{wxGraphicsPath::AddRoundedRectangle
}\label{wxgraphicspathaddroundedrectangle
}
104 \func{void
}{AddRoundedRectangle
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{wxDouble
}{w
},
\param{wxDouble
}{h
},
\param{wxDouble
}{radius
}}
106 Appends a rounded rectangle as a new closed subpath.
108 \membersection{wxGraphicsPath::CloseSubpath
}\label{wxgraphicspathclosesubpath
}
110 \func{void
}{CloseSubpath
}{\void}
112 Closes the current sub-path.
114 \membersection{wxGraphicsPath::Contains
}\label{wxgraphicspathcontains
}
116 \constfunc{bool
}{Contains
}{\param{const wxPoint2DDouble\&
}{c
},
\param{int
}{fillStyle = wxODDEVEN
\_RULE}}
118 \constfunc{bool
}{Contains
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{int
}{fillStyle = wxODDEVEN
\_RULE}}
120 Returns true if the point is within the path.
122 \membersection{wxGraphicsPath::GetBox
}\label{wxgraphicspathgetbox
}
124 \constfunc{wxRect2DDouble
}{GetBox
}{\void}
126 \constfunc{void
}{GetBox
}{\param{wxDouble*
}{x
},
\param{wxDouble*
}{y
},
\param{wxDouble*
}{w
},
\param{wxDouble*
}{h
}}
128 Gets the bounding box enclosing all points (possibly including control points).
130 \membersection{wxGraphicsPath::GetCurrentPoint
}\label{wxgraphicspathgetcurrentpoint
}
132 \constfunc{void
}{GetCurrentPoint
}{\param{wxDouble*
}{x
},
\param{wxDouble*
}{y
}}
134 \constfunc{wxPoint2DDouble
}{GetCurrentPoint
}{\void}
136 Gets the last point of the current path, (
0,
0) if not yet set.
138 \membersection{wxGraphicsPath::Transform
}\label{wxgraphicspathtransform
}
140 \func{void
}{Transform
}{\param{const wxGraphicsMatrix\&
}{matrix
}}
142 Transforms each point of this path by the matrix.
144 \membersection{wxGraphicsPath::GetNativePath
}\label{wxgraphicspathgetnativepath
}
146 \constfunc{void *
}{GetNativePath
}{\void}
148 Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo
\_path\_t pointer for cairo).
150 \membersection{wxGraphicsPath::UnGetNativePath
}\label{wxgraphicspathungetnativepath
}
152 \constfunc{void
}{UnGetNativePath
}{\param{void*
}{p
}}
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).