Skip to content

Allow to apply transform to path #36

@Harvie

Description

@Harvie

As described in https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform

it's common for svg <path> element to have transform="" attribute

typicaly it looks something like this:

<path id="something" d="..."  transform="rotate(-10 50 100)
                translate(-36 45.5)
                skewX(40)
                scale(1 0.5)" />

Can you please add possibility to apply this transformation if supplied to svg.path during parsing stage? In fact only support for rotate(), translate() and scale() is needed in most cases. It should be pretty easy to do.

In ideal case svg.path would take two individual strings: d attribute and transform attribute.
It would be also perfect, if i can just supply whole <path ... /> string and svg.path would extract the data from it, so i don't need to parse it by myself. Or even whole SVG file, which would in turn get exploded into multiple paths.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions