Line
A straight line connecting two points.
- class pptx_shapes.shapes.Line(x1: float, y1: float, x2: float, y2: float, stroke: pptx_shapes.style.stroke_style.StrokeStyle = StrokeStyle(color='black', thickness=1.0, opacity=1.0, dash=<LineDash.SOLID: 'solid'>))
Parameters
x1(float) – left position of the start point (in centimeters).y1(float) – top position of the start point (in centimeters).x2(float) – left position of the end point (in centimeters).y2(float) – top position of the end point (in centimeters).stroke(StrokeStyle, optional) – stroke style.
Example
from pptx_shapes.shapes import Line
from pptx_shapes.style import StrokeStyle
Line(x1=13, y1=1, x2=1, y2=6, stroke=StrokeStyle(thickness=2, color="#89dd73"))