Skip to main content

Path

Draws a path with given elements with the given paint.

Whether this shape is filled, stroked, or both, is controlled by paint.style. If the path is filled, then sub-paths within it are implicitly closed (see Path.Close).

Inherits: canvas.Shape

Properties

  • elements - The list of path elements.
  • paint - A style to draw a path with.

Properties

elementsclass-attributeinstance-attribute

elements: list[PathElement] = field(default_factory=list)

The list of path elements.

paintclass-attributeinstance-attribute

paint: Paint = field(default_factory=(lambda: Paint()))

A style to draw a path with.