.. include:: headings.inc .. currentmodule:: lib.pdfviewer.dcgraphics .. highlight:: python .. _lib.pdfviewer.dcgraphics.dcGraphicsPath: ========================================================================================================================================== |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** .. raw:: html

Inheritance diagram of dcGraphicsPath

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~lib.pdfviewer.dcgraphics.dcGraphicsPath.__init__` A path is essentially an object that we use just for :meth:`~lib.pdfviewer.dcgraphics.dcGraphicsPath.AddCurveToPoint` Adds a cubic Bezier curve from the current point, using two :meth:`~lib.pdfviewer.dcgraphics.dcGraphicsPath.AddLineToPoint` Adds a straight line from the current point to (x,y) :meth:`~lib.pdfviewer.dcgraphics.dcGraphicsPath.AddRectangle` Adds a new rectangle as a closed sub-path. :meth:`~lib.pdfviewer.dcgraphics.dcGraphicsPath.CloseSubpath` Adds a line segment to the path from the current point to the :meth:`~lib.pdfviewer.dcgraphics.dcGraphicsPath.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. .. method:: __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 .. method:: 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. .. method:: AddLineToPoint(self, x, y) Adds a straight line from the current point to (x,y) .. method:: AddRectangle(self, x, y, w, h) Adds a new rectangle as a closed sub-path. .. method:: 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. .. method:: MoveToPoint(self, x, y) Begins a new sub-path at (x,y) by moving the "current point" there.