Arc

A arc or rounded arc, positioned by its bounding box.

Arc example Arc example
class pptx_shapes.shapes.Arc(x: float, y: float, width: float, height: float, start_angle: float = 0, end_angle: float = 180, angle: float = 0, fill: pptx_shapes.style.fill_style.FillStyle | None = None, stroke: pptx_shapes.style.stroke_style.StrokeStyle | None = None)

Parameters

  • x (float) – left position (in centimeters).

  • y (float) – top position (in centimeters).

  • width (float) – width (in centimeters).

  • height (float) – height (in centimeters).

  • start_angle (float, optional) – start angle of the arc (in degrees, default 0)

  • end_angle (float, optional) – end angle of the arc (in degrees, default 180)

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

  • fill (FillStyle, optional) – fill style.

  • stroke (StrokeStyle, optional) – stroke style.

Example

from pptx_shapes.enums import LineDash
from pptx_shapes.shapes import Arc
from pptx_shapes.style import StrokeStyle

arc = Arc(
    x=24, y=9, width=5, height=8,
    start_angle=90, end_angle=270,
    stroke=StrokeStyle(color="#f00", thickness=2.5, dash=LineDash.DASH_DOTTED)
)

← Back to all shapes