Polyline

An polyline, positioned by its bounding box.

Polyline example
class pptx_shapes.shapes.Polyline(points: List[Tuple[float, float]], angle: float = 0, stroke: pptx_shapes.style.stroke_style.StrokeStyle | None = None)

Parameters

  • points (List[Tuple[float, float]]) – a list of tuples of (x, y) coordinates that define the vertices of the polyline.

  • angle (float, optional) – rotation in degrees, default is 0.

  • stroke (StrokeStyle, optional) – stroke style.

Example

from pptx_shapes.shapes import Polyline
from pptx_shapes.style import StrokeStyle

polyline = Polyline(
    points=[(15, 5), (16, 6), (15, 7), (12, 7), (11, 6), (12, 5)],
    angle=45,
    stroke=StrokeStyle(color="magenta", thickness=2.5)
)

← Back to all shapes