![]() ![]() ![]() ![]() wxgraphicspatha 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 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. derived from include files <wx/graphics.h> members
wxgraphicspath::movetopoint
wxgraphicspath::movetopointvoid movetopoint(wxdouble x, wxdouble y) void movetopoint(const wxpoint2ddouble& p) begins a new subpath at (x,y)
wxgraphicspath::addarcvoid addarc(wxdouble x, wxdouble y, wxdouble r, wxdouble startangle, wxdouble endangle, bool clockwise) adds an arc of a circle centering at (x,y) with radius (r) from startangle to endangle. void addarc(const wxpoint2ddouble& c, wxdouble r, wxdouble startangle, wxdouble endangle, bool clockwise)
wxgraphicspath::addarctopointvoid addarctopoint(wxdouble x1, wxdouble y1, wxdouble x2, wxdouble y2, wxdouble r) 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).
wxgraphicspath::addcirclevoid addcircle(wxdouble x, wxdouble y, wxdouble r) appends a circle around (x,y) with radius r as a new closed subpath.
wxgraphicspath::addcurvetopointvoid addcurvetopoint(wxdouble cx1, wxdouble cy1, wxdouble cx2, wxdouble cy2, wxdouble x, wxdouble y) adds a cubic bezier curve from the current point, using two control points and an end point. void addcurvetopoint(const wxpoint2ddouble& c1, const wxpoint2ddouble& c2, const wxpoint2ddouble& e)
wxgraphicspath::addellipsevoid addellipse(wxdouble x, wxdouble y, wxdouble w, wxdouble h) appends an ellipse fitting into the passed in rectangle.
wxgraphicspath::addlinetopointvoid addlinetopoint(wxdouble x, wxdouble y) adds a straight line from the current point to (x,y). void addlinetopoint(const wxpoint2ddouble& p)
wxgraphicspath::addpathvoid addpath(const wxgraphicspath& path) adds another path.
wxgraphicspath::addquadcurvetopointvoid addquadcurvetopoint(wxdouble cx, wxdouble cy, wxdouble x, wxdouble y) adds a quadratic bezier curve from the current point, using a control point and an end point.
wxgraphicspath::addrectanglevoid addrectangle(wxdouble x, wxdouble y, wxdouble w, wxdouble h) appends a rectangle as a new closed subpath.
wxgraphicspath::addroundedrectanglevoid addroundedrectangle(wxdouble x, wxdouble y, wxdouble w, wxdouble h, wxdouble radius) appends a rounded rectangle as a new closed subpath.
wxgraphicspath::closesubpathvoid closesubpath() closes the current sub-path.
wxgraphicspath::containsbool contains(const wxpoint2ddouble& c, int fillstyle = wxoddeven_rule) const bool contains(wxdouble x, wxdouble y, int fillstyle = wxoddeven_rule) const returns true if the point is within the path.
wxgraphicspath::getboxwxrect2ddouble getbox() const void getbox(wxdouble* x, wxdouble* y, wxdouble* w, wxdouble* h) const gets the bounding box enclosing all points (possibly including control points).
wxgraphicspath::getcurrentpointvoid getcurrentpoint(wxdouble* x, wxdouble* y) const wxpoint2ddouble getcurrentpoint() const gets the last point of the current path, (0,0) if not yet set.
wxgraphicspath::transformvoid transform(const wxgraphicsmatrix& matrix) transforms each point of this path by the matrix.
wxgraphicspath::getnativepathvoid * getnativepath() const returns the native path (cgpathref for core graphics, path pointer for gdiplus and a cairo_path_t pointer for cairo).
wxgraphicspath::ungetnativepathvoid ungetnativepath(void* p) const gives back the native path returned by getnativepath() because there might be some deallocations necessary (eg on cairo the native path returned by getnativepath is newly allocated each time).
|