Skip to content

triangle_strategy

TriangleDrawingStrategy

Bases: ShapeDrawingStrategy

Drawing strategy for Triangle shapes.

element(dwg, shape)

Return the outline of a :class:Triangle.

Source code in src/layerforge/svg/drawing/strategies/triangle_strategy.py
12
13
14
def element(self, dwg: Drawing, shape: BaseShape) -> BaseElement:
    """Return the outline of a :class:`Triangle`."""
    return dwg.polygon(self.outline_points(shape))