phoenix_title wx.lib.graphics.GraphicsPath

A GraphicsPath is a representation of a geometric path, essentially a collection of lines and curves. Paths can be used to define areas to be stroked and filled on a GraphicsContext.


class_hierarchy Class Hierarchy

Inheritance diagram for class GraphicsPath:

super_classes Known Superclasses

wx.lib.graphics.GraphicsObject


method_summary Methods Summary

__init__

Initialize self. See help(type(self)) for accurate signature.

AddArc

Adds an arc of a circle centering at (x,y) with radius, from

AddArcToPoint

Adds a an arc to two tangents connecting (current) to (x1,y1)

AddCircle

Appends a new closed sub-path as a circle around (x,y).

AddCurveToPoint

Adds a cubic Bezier curve from the current point, using two

AddEllipse

Appends an ellipse fitting into the given rectangle as a closed sub-path.

AddLineToPoint

Adds a straight line from the current point to (x,y)

AddPath

Appends the given path to this path.

AddQuadCurveToPoint

Adds a quadratic Bezier curve from the current point, using a

AddRectangle

Adds a new rectangle as a closed sub-path.

AddRoundedRectangle

Adds a new rounded rectangle as a closed sub-path.

Clone

Return a new path initialized with the current contents of this path.

CloseSubpath

Adds a line segment to the path from the current point to the

Contains

Returns True if the point lies within the path.

GetBox

Return the bounding box enclosing all points on this path.

GetCurrentPoint

Gets the current point of the path, which is conceptually the

GetNativePath

Returns the path as a cairo.Path object.

MoveToPoint

Begins a new sub-path at (x,y) by moving the “current point” there.

Transform

Transforms each point in this path by the matrix


api Class API

class GraphicsPath(GraphicsObject)

A GraphicsPath is a representation of a geometric path, essentially a collection of lines and curves. Paths can be used to define areas to be stroked and filled on a GraphicsContext.


Methods

__init__(self)

Initialize self. See help(type(self)) for accurate signature.



AddArc(self, x, y, radius, startAngle, endAngle, clockwise=True) Self

Adds an arc of a circle centering at (x,y) with radius, from startAngle to endAngle.



AddArcToPoint(self, x1, y1, x2, y2, radius) Self

Adds 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)



AddCircle(self, x, y, radius) Self

Appends a new closed sub-path as a circle around (x,y).



AddCurveToPoint(self, cx1, cy1, cx2, cy2, x, y) Self

Adds a cubic Bezier curve from the current point, using two control points and an end point.



AddEllipse(self, x, y, w, h) Self

Appends an ellipse fitting into the given rectangle as a closed sub-path.



AddLineToPoint(self, x, y) Self

Adds a straight line from the current point to (x,y)



AddPath(self, path) Self

Appends the given path to this path.



AddQuadCurveToPoint(self, cx, cy, x, y) Self

Adds a quadratic Bezier curve from the current point, using a control point and an end point.



AddRectangle(self, x, y, w, h) Self

Adds a new rectangle as a closed sub-path.



AddRoundedRectangle(self, x, y, w, h, radius) Self

Adds a new rounded rectangle as a closed sub-path.



Clone(self)

Return a new path initialized with the current contents of this path.



CloseSubpath(self) Self

Adds a line segment to the path from the current point to the beginning of the current sub-path, and closes this sub-path.



Contains(self, x, y, fillStyle=wx.ODDEVEN_RULE)

Returns True if the point lies within the path.



GetBox(self)

Return the bounding box enclosing all points on this path.



GetCurrentPoint(self)

Gets the current point of the path, which is conceptually the final point reached by the last path operation.



GetNativePath(self)

Returns the path as a cairo.Path object.



MoveToPoint(self, x, y) Self

Begins a new sub-path at (x,y) by moving the “current point” there.



Transform(self, matrix) Self

Transforms each point in this path by the matrix