CustomPattern

Custom pattern with arbitrary content

A pattern defines a small graphic tile that repeats to fill a shape. The pattern tile can contain any shapes (circles, rectangles, paths, etc.)

Constructor

CustomPattern(
    width: float,
    height: float,
    content: tuple[tuple[Any, Any], ...],
    pattern_units: str = 'userSpaceOnUse'
) -> None

Methods

interpolate

interpolate(other: Pattern, t: float)

Custom patterns use step interpolation

to_drawsvg

to_drawsvg(drawing: Optional[Drawing] = None) -> Pattern

Convert to drawsvg Pattern object