Closed chibai closed 2 years ago
You can pass a matrix to the SVG.parse() routine. This should be applied to everything below it.
@staticmethod
def parse(
source,
reify=True,
ppi=DEFAULT_PPI,
width=None,
height=None,
color="black",
transform=None,
context=None,
):
"""
Parses the SVG file. All attributes are things which the SVG document itself could not be aware of, such as
the real size of pixels and the size of the viewport (as opposed to the viewbox).
:param source: Source svg file or stream.
:param reify: Should the Geometry sized or have lazy matrices.
:param ppi: How many physical pixels per inch are there in this view.
:param width: The physical width of the viewport
:param height: The physical height of the viewport
:param color: the `currentColor` value from outside the current scope.
:param transform: Any required transformations to be pre-applied to this document
:param context: Any existing document context.
:return:
"""
The svg object itself in the spec wasn't very clear as to how to apply a matrix on it with regard to the viewport etc. I think it just had height and width and the viewport.
I'm trying to rotate the whole svg, but it seems not supported~~ Is there any approach to do this? Thank you.