Package wx :: Class GraphicsPath

[frames | no frames]

## Type GraphicsPath

    object --+
             |
        Object --+
                 |
    GraphicsObject --+
                     |
                    GraphicsPath

Proxy of C++ GraphicsPath class

Method Summary
| `__init__(self)`
| `__del__(self)`
| ``AddArc`(self, x, y, r, startAngle, endAngle, clockwise)` bool clockwise=True)
| ``AddArcToPoint`(self, 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)
| ``AddCircle`(self, x, y, r)` Appends a circle around (x,y) with radius r as a new closed subpath.
| ``AddCurveToPoint`(self, cx1, cy1, cx2, cy2, x, y)` AddCurveToPoint(self, Point2D c1, Point2D c2, Point2D e)
| ``AddEllipse`(self, x, y, w, h)` Appends an ellipse fitting into the passed in rectangle.
| ``AddLineToPoint`(self, x, y)` AddLineToPoint(self, Point2D p)
| ``AddPath`(self, path)` Adds another path
| ``AddQuadCurveToPoint`(self, cx, cy, x, y)` Adds a quadratic Bezier curve from the current point, using a control point and an end point
| ``AddRectangle`(self, x, y, w, h)` Appends a rectangle as a new closed subpath.
| ``AddRoundedRectangle`(self, x, y, w, h, radius)` Appends a rounded rectangle.
| ``CloseSubpath`(self)` Closes the current sub-path.
bool | ``Contains`(self, x, y, fillStyle)` Contains(self, Point2D c, int fillStyle=ODDEVEN_RULE) -> bool
Rect2D | ``GetBox`(self)` Gets the bounding box enclosing all points (possibly including control points)
Point2D | ``GetCurrentPoint`(self)` Gets the last point of the current path, (0,0) if not yet set
void | ``GetNativePath`(self)` Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo_path_t pointer for cairo).
| ``MoveToPoint`(self, x, y)` MoveToPoint(self, Point2D p)
| ``Transform`(self, matrix)` Transforms each point of this path by the matrix
| ``UnGetNativePath`(self, p)` 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).

Property Summary
| `thisown`: The membership flag

Method Details

### AddArc(self, x, y, r, startAngle, endAngle, clockwise=True)

AddArc(self, Point2D c, Double r, Double startAngle, Double endAngle,
  bool clockwise=True)

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

  Parameters:
    `x`
    (type=Double)

    `y`
    (type=Double)

    `r`
    (type=Double)

    `startAngle`
    (type=Double)

    `endAngle`
    (type=Double)

    `clockwise`
    (type=bool)

### AddArcToPoint(self, 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`
    (type=Double)

    `y1`
    (type=Double)

    `x2`
    (type=Double)

    `y2`
    (type=Double)

    `r`
    (type=Double)

### AddCircle(self, x, y, r)

Appends a circle around (x,y) with radius r as a new closed subpath.

  Parameters:
    `x`
    (type=Double)

    `y`
    (type=Double)

    `r`
    (type=Double)

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

AddCurveToPoint(self, Point2D c1, Point2D c2, Point2D e)

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

  Parameters:
    `cx1`
    (type=Double)

    `cy1`
    (type=Double)

    `cx2`
    (type=Double)

    `cy2`
    (type=Double)

    `x`
    (type=Double)

    `y`
    (type=Double)

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

Appends an ellipse fitting into the passed in rectangle.

  Parameters:
    `x`
    (type=Double)

    `y`
    (type=Double)

    `w`
    (type=Double)

    `h`
    (type=Double)

### AddLineToPoint(self, x, y)

AddLineToPoint(self, Point2D p)

Adds a straight line from the current point to the specified point.

  Parameters:
    `x`
    (type=Double)

    `y`
    (type=Double)

### AddPath(self, path)

Adds another path

  Parameters:
    `path`
    (type=GraphicsPath)

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

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

  Parameters:
    `cx`
    (type=Double)

    `cy`
    (type=Double)

    `x`
    (type=Double)

    `y`
    (type=Double)

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

Appends a rectangle as a new closed subpath.

  Parameters:
    `x`
    (type=Double)

    `y`
    (type=Double)

    `w`
    (type=Double)

    `h`
    (type=Double)

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

Appends a rounded rectangle.

  Parameters:
    `x`
    (type=Double)

    `y`
    (type=Double)

    `w`
    (type=Double)

    `h`
    (type=Double)

    `radius`
    (type=Double)

### CloseSubpath(self)

Closes the current sub-path.

### Contains(self, x, y, fillStyle=ODDEVEN_RULE)

Contains(self, Point2D c, int fillStyle=ODDEVEN_RULE) -> bool

Returns `True` if the point is within the path.

  Parameters:
    `x`
    (type=Double)

    `y`
    (type=Double)

    `fillStyle`
    (type=int)

  Returns:
    bool

### GetBox(self)

Gets the bounding box enclosing all points (possibly including control points)

  Returns:
    Rect2D

### GetCurrentPoint(self)

Gets the last point of the current path, (0,0) if not yet set

  Returns:
    Point2D

### GetNativePath(self)

Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo_path_t pointer for cairo). NOTE: For wxPython we still need a way to make this value usable.

  Returns:
    void

### MoveToPoint(self, x, y)

MoveToPoint(self, Point2D p)

Begins a new subpath at the specified point.

  Parameters:
    `x`
    (type=Double)

    `y`
    (type=Double)

### Transform(self, matrix)

Transforms each point of this path by the matrix

  Parameters:
    `matrix`
    (type=GraphicsMatrix)

### UnGetNativePath(self, p)

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

  Parameters:
    `p`
    (type=void)

Property Details

### thisown

The membership flag

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:08:46 2007 | http://epydoc.sf.net