RazrFalcon / svgcleaner

svgcleaner could help you to clean up your SVG files from the unnecessary data.
GNU General Public License v2.0
1.63k stars 94 forks source link

Add support for gradientTransform matrix #238

Open ghost opened 3 years ago

ghost commented 3 years ago

Doesn't minify a or with a gradientTransform attribute set to a matrix() function.

RazrFalcon commented 3 years ago

gradientTransform is supported.

ghost commented 3 years ago

I had an SVG with gradientTransform="matrix(0.03 0 0 0.3 2 2)" but this was not processed so I did it manually :/ Are you sure matrix() is supported as well as transform() and/or scale()

RazrFalcon commented 3 years ago

Only proportional scale and translate are supported. Everything else cannot be applied. I'm not sure how exactly you're applying it manually.

ghost commented 3 years ago

I calculated the translated and scaled gradient handles, then checked my working with Inkscape.

Gradients are simple to support this feature with, I assume paths are much more complex

https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale()