[frames | no frames]

## Type GraphicsPath

```    `object` --+
|
`GraphicsObject` --+
|
GraphicsPath
```

A GraphicsPath is a representaion 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.

Method Summary
`__init__(self)`
```AddArc(self, x, y, radius, startAngle, endAngle, clockwise)```
Adds an arc of a circle centering at (x,y) with radius, from startAngle to endAngle.
```AddArcToPoint(self, x1, y1, x2, y2, radius)```
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)```
Appends a new closed sub-path as a circle around (x,y).
```AddCurveToPoint(self, cx1, cy1, cx2, cy2, x, y)```
Adds a cubic Bezier curve from the current point, using two control points and an end point.
```AddEllipse(self, x, y, w, h)```
Appends an elipse fitting into the given rectangle as a closed sub-path.
```AddLineToPoint(self, x, y)```
Adds a straight line from the current point to (x,y)
```AddPath(self, path)```
Appends the given path to this path.
`AddQuadCurveToPoint(self)`
Adds a quadratic Bexier curve from the current point, using a control point and an end point.
```AddRectangle(self, x, y, w, h)```
Adds a new rectanlge as a closed sub-path.
```AddRoundedRectangle(self, x, y, w, h, radius)```
Adds a new rounded rectanlge as a closed sub-path.
`Clone(self)`
Return a new path initialized with the current contents of this path.
`CloseSubpath(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)```
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)```
Begins a new sub-path at (x,y) by moving the "current point" there.
```Transform(self, matrix)```
Transforms each point in this path by the matirx

Method Details

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

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)

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

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

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

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

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

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

Appends the given path to this path.

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

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

Adds a new rectanlge as a closed sub-path.

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

### Clone(self)

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

### CloseSubpath(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=1)

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)

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

### Transform(self, matrix)

Transforms each point in this path by the matirx

 Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:52:14 2009 http://epydoc.sf.net