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