Table Of Contents

Previous topic

dcGraphicsMatrix

Next topic

dcGraphicsState

This Page

phoenix_title dcGraphicsPath

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.


class_hierarchy Inheritance Diagram

Inheritance diagram for class dcGraphicsPath

Inheritance diagram of dcGraphicsPath


method_summary Methods Summary

__init__ A path is essentially an object that we use just for
AddCurveToPoint Adds a cubic Bezier curve from the current point, using two
AddLineToPoint Adds a straight line from the current point to (x,y)
AddRectangle Adds a new rectangle as a closed sub-path.
CloseSubpath Adds a line segment to the path from the current point to the
MoveToPoint Begins a new sub-path at (x,y) by moving the “current point” there.

api Class API



class dcGraphicsPath(object)

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.


Methods



__init__(self, parent=None)

A path is essentially an object that we use just for collecting path moves, lines, and curves in order to apply them to the real context using DrawPath



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.



AddLineToPoint(self, x, y)

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



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

Adds a new rectangle as a closed sub-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.



MoveToPoint(self, x, y)

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