thednp / svg-path-commander

Typescript tools for advanced processing of SVG path data.
https://thednp.github.io/svg-path-commander/
MIT License
228 stars 19 forks source link

create path from stroked shape/path #39

Closed tsdexter closed 12 months ago

tsdexter commented 12 months ago

Is it possible to use this library (or any other that you know of) that can convert a shape like rect, circle, path with stroke properties to a new path that includes the stroke within the path without having stroke properties on the element?

For example, if the original shape is a 2x2 square with a stroke width of 1 the new path would draw a 3x3 square.

thednp commented 12 months ago

I know SVGO does many things, not sure if this is possible however.

tsdexter commented 12 months ago

Thanks for the response. I found SVGFixer which can do it with CLI/Node...looking at whether I can port it to the browser now.