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
}\\
20 \helpref{wxObject
}{wxobject
}
22 \wxheading{Include files
}
28 \helpref{wxCore
}{librarieslist
}
30 \latexignore{\rtfignore{\wxheading{Members
}}}
32 \membersection{wxGraphicsPath::MoveToPoint
}\label{wxgraphicspathmovetopoint
}
34 \func{void
}{MoveToPoint
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
}}
36 \func{void
}{MoveToPoint
}{\param{const wxPoint2DDouble\&
}{p
}}
38 Begins a new subpath at (x,y)
40 \membersection{wxGraphicsPath::AddArc
}\label{wxgraphicspathaddarc
}
42 \func{void
}{AddArc
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{wxDouble
}{r
},
\param{wxDouble
}{startAngle
},
\param{wxDouble
}{endAngle
},
43 \param{bool
}{clockwise
}}
45 Adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle.
47 \func{void
}{AddArc
}{\param{const wxPoint2DDouble\&
}{c
},
\param{wxDouble
}{r
},
\param{wxDouble
}{startAngle
},
\param{wxDouble
}{endAngle
},
48 \param{bool
}{clockwise
}}
50 \membersection{wxGraphicsPath::AddArcToPoint
}\label{wxgraphicspathaddarctopoint
}
52 \func{void
}{AddArcToPoint
}{\param{wxDouble
}{x1
},
\param{wxDouble
}{y1
},
\param{wxDouble
}{x2
},
\param{wxDouble
}{y2
},
\param{wxDouble
}{r
}}
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).
56 \membersection{wxGraphicsPath::AddCircle
}\label{wxgraphicspathaddcircle
}
58 \func{void
}{AddCircle
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{wxDouble
}{r
}}
60 Appends a circle around (x,y) with radius r as a new closed subpath.
62 \membersection{wxGraphicsPath::AddCurveToPoint
}\label{wxgraphicspathaddcurvetopoint
}
64 \func{void
}{AddCurveToPoint
}{\param{wxDouble
}{cx1
},
\param{wxDouble
}{cy1
},
\param{wxDouble
}{cx2
},
\param{wxDouble
}{cy2
},
\param{wxDouble
}{x
},
67 Adds a cubic Bezier curve from the current point, using two control points and an end point.
69 \func{void
}{AddCurveToPoint
}{\param{const wxPoint2DDouble\&
}{c1
},
\param{const wxPoint2DDouble\&
}{c2
},
\param{const wxPoint2DDouble\&
}{e
}}
71 \membersection{wxGraphicsPath::AddEllipse
}\label{wxgraphicspathaddellipse
}
73 \func{void
}{AddEllipse
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{wxDouble
}{w
},
\param{wxDouble
}{h
}}
75 Appends an ellipse fitting into the passed in rectangle.
77 \membersection{wxGraphicsPath::AddLineToPoint
}\label{wxgraphicspathaddlinetopoint
}
79 \func{void
}{AddLineToPoint
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
}}
81 Adds a straight line from the current point to (x,y).
83 \func{void
}{AddLineToPoint
}{\param{const wxPoint2DDouble\&
}{p
}}
85 \membersection{wxGraphicsPath::AddPath
}\label{wxgraphicspathaddpath
}
87 \func{void
}{AddPath
}{\param{const wxGraphicsPath\&
}{path
}}
91 \membersection{wxGraphicsPath::AddQuadCurveToPoint
}\label{wxgraphicspathaddquadcurvetopoint
}
93 \func{void
}{AddQuadCurveToPoint
}{\param{wxDouble
}{cx
},
\param{wxDouble
}{cy
},
\param{wxDouble
}{x
},
\param{wxDouble
}{y
}}
95 Adds a quadratic Bezier curve from the current point, using a control point and an end point.
97 \membersection{wxGraphicsPath::AddRectangle
}\label{wxgraphicspathaddrectangle
}
99 \func{void
}{AddRectangle
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{wxDouble
}{w
},
\param{wxDouble
}{h
}}
101 Appends a rectangle as a new closed subpath.
103 \membersection{wxGraphicsPath::AddRoundedRectangle
}\label{wxgraphicspathaddroundedrectangle
}
105 \func{void
}{AddRoundedRectangle
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{wxDouble
}{w
},
\param{wxDouble
}{h
},
\param{wxDouble
}{radius
}}
107 Appends a rounded rectangle as a new closed subpath.
109 \membersection{wxGraphicsPath::CloseSubpath
}\label{wxgraphicspathclosesubpath
}
111 \func{void
}{CloseSubpath
}{\void}
113 Closes the current sub-path.
115 \membersection{wxGraphicsPath::Contains
}\label{wxgraphicspathcontains
}
117 \constfunc{bool
}{Contains
}{\param{const wxPoint2DDouble\&
}{c
},
\param{int
}{fillStyle = wxODDEVEN
\_RULE}}
119 \constfunc{bool
}{Contains
}{\param{wxDouble
}{x
},
\param{wxDouble
}{y
},
\param{int
}{fillStyle = wxODDEVEN
\_RULE}}
121 Returns true if the point is within the path.
123 \membersection{wxGraphicsPath::GetBox
}\label{wxgraphicspathgetbox
}
125 \constfunc{wxRect2DDouble
}{GetBox
}{\void}
127 \constfunc{void
}{GetBox
}{\param{wxDouble*
}{x
},
\param{wxDouble*
}{y
},
\param{wxDouble*
}{w
},
\param{wxDouble*
}{h
}}
129 Gets the bounding box enclosing all points (possibly including control points).
131 \membersection{wxGraphicsPath::GetCurrentPoint
}\label{wxgraphicspathgetcurrentpoint
}
133 \constfunc{void
}{GetCurrentPoint
}{\param{wxDouble*
}{x
},
\param{wxDouble*
}{y
}}
135 \constfunc{wxPoint2DDouble
}{GetCurrentPoint
}{\void}
137 Gets the last point of the current path, (
0,
0) if not yet set.
139 \membersection{wxGraphicsPath::Transform
}\label{wxgraphicspathtransform
}
141 \func{void
}{Transform
}{\param{const wxGraphicsMatrix\&
}{matrix
}}
143 Transforms each point of this path by the matrix.
145 \membersection{wxGraphicsPath::GetNativePath
}\label{wxgraphicspathgetnativepath
}
147 \constfunc{void *
}{GetNativePath
}{\void}
149 Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo
\_path\_t pointer for cairo).
151 \membersection{wxGraphicsPath::UnGetNativePath
}\label{wxgraphicspathungetnativepath
}
153 \constfunc{void
}{UnGetNativePath
}{\param{void*
}{p
}}
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).