*************** wx.GraphicsPath *************** Inheritance diagram for `wx.GraphicsPath`: | .. inheritance-diagram:: wx.GraphicsPath | Description =========== A `wx.GraphicsPath` 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 ^^^^^^^^^^^^^ * `wx.GraphicsObject `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `AddArc <#AddArc>`_ * `AddArcToPoint <#AddArcToPoint>`_ * `AddCircle <#AddCircle>`_ * `AddCurveToPoint <#AddCurveToPoint>`_ * `AddEllipse <#AddEllipse>`_ * `AddLineToPoint <#AddLineToPoint>`_ * `AddPath <#AddPath>`_ * `AddQuadCurveToPoint <#AddQuadCurveToPoint>`_ * `AddRectangle <#AddRectangle>`_ * `AddRoundedRectangle <#AddRoundedRectangle>`_ * `CloseSubpath <#CloseSubpath>`_ * `Contains <#Contains>`_ * `GetBox <#GetBox>`_ * `GetCurrentPoint <#GetCurrentPoint>`_ * `GetNativePath <#GetNativePath>`_ * `MoveToPoint <#MoveToPoint>`_ * `Transform <#Transform>`_ * `UnGetNativePath <#UnGetNativePath>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__() `No docstrings available for this method.` -------- .. method:: AddArc(x, y, r, startAngle, endAngle, clockwise=True) Adds an arc of a circle centering at (`x`, `y`) with radius `r` from `startAngle` to `endAngle`. **Parameters:** * `x` (double) * `y` (double) * `r` (double) * `startAngle` (double) * `endAngle` (double) * `clockwise` (bool) -------- .. method:: AddArcToPoint(x1, y1, x2, y2, r) Appends 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`). **Parameters:** * `x1` (double) * `y1` (double) * `x2` (double) * `y2` (double) * `r` (double) -------- .. method:: AddCircle(x, y, r) Appends a circle around (`x`, `y`) with radius `r` as a new closed subpath. **Parameters:** * `x` (double) * `y` (double) * `r` (double) -------- .. method:: AddCurveToPoint(cx1, cy1, cx2, cy2, x, y) Adds a cubic Bezier curve from the current point, using two control points and an end point. **Parameters:** * `cx1` (double) * `cy1` (double) * `cx2` (double) * `cy2` (double) * `x` (double) * `y` (double) -------- .. method:: AddEllipse(x, y, w, h) Appends an ellipse fitting into the passed in rectangle. **Parameters:** * `x` (double) * `y` (double) * `w` (double) * `h` (double) -------- .. method:: AddLineToPoint(x, y) Adds a straight line from the current point to (`x`, `y`). **Parameters:** * `x` (double) * `y` (double) -------- .. method:: AddPath(path) Adds another path. **Parameters:** * `path` (`wx.GraphicsPath `_) -------- .. method:: AddQuadCurveToPoint(cx, cy, x, y) Adds a quadratic Bezier curve from the current point, using a control point and an end point. **Parameters:** * `cx` (double) * `cy` (double) * `x` (double) * `y` (double) -------- .. method:: AddRectangle(x, y, w, h) Appends a rectangle as a new closed subpath. **Parameters:** * `x` (double) * `y` (double) * `w` (double) * `h` (double) -------- .. method:: AddRoundedRectangle(x, y, w, h, radius) Appends a rounded rectangle as a new closed subpath. **Parameters:** * `x` (double) * `y` (double) * `w` (double) * `h` (double) * `radius` (double) -------- .. method:: CloseSubpath() Closes the current sub-path. -------- .. method:: Contains(c, fillStyle=wx.ODDEVEN_RULE) Returns ``True`` if the point is within the path. **Parameters:** * `c` (`wx.Point2DDouble`) * `fillStyle` (int) | **Returns:** `bool` -------- .. method:: GetBox() Gets the bounding box enclosing all points (possibly including control points). | **Returns:** `wx.Rect2DDouble` -------- .. method:: GetCurrentPoint() Gets the last point of the current path, (0, 0) if not yet set. | **Returns:** `wx.Point2DDouble` -------- .. method:: GetNativePath() Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo_path_t pointer for cairo). | **Returns:** `void` .. note:: For wxPython we still need a way to make this value usable. -------- .. method:: MoveToPoint(x, y) Begins a new subpath at (`x`, `y`) **Parameters:** * `x` (double) * `y` (double) -------- .. method:: Transform(matrix) Transforms each point of this path by the matrix. **Parameters:** * `matrix` (`wx.GraphicsMatrix `_) -------- .. method:: UnGetNativePath(p) Gives back the native path returned by `GetNativePath <#GetNativePath>`_ because there might be some deallocations necessary (eg on cairo the native path returned by `GetNativePath` is newly allocated each time). **Parameters:** * `p` (int)