Skip to main content

raygeo.svg.transform

SVG transform attribute parsing.

Parses a transform attribute value (translate, scale, rotate, skewX, skewY, matrix, or a space-separated combination) into a 3x3 matrix.

Functions

parse_svg_transform()

parse_svg_transform(transform_str: str) -> numpy.NDArray[numpy.float64]

Parse an SVG transform attribute string (translate only).

Returns a 3x3 identity matrix with translation applied.

ParameterTypeDescription
transform_strstrSVG transform attribute value.
Returnsnumpy.NDArray[numpy.float64]3x3 affine transformation matrix as numpy array.
ComplexityO(1)