d3 / d3-path

Serialize Canvas path commands to SVG.
https://d3js.org/d3-path
ISC License
196 stars 37 forks source link

Support for Transforms #15

Closed jacobp100 closed 7 years ago

jacobp100 commented 7 years ago

The spec says that the current transform should be applied to each point as the path is constructed. This means that if the transform changes whilst constructing the path, the output will be different, and it is noe enough to apply a transform at the end of path creation.

Are there any plans to support transforms? Or would a PR to do this be accepted?

mbostock commented 7 years ago

No, sorry. If you want transforms, you must either call the appropriate methods on a CanvasRenderingContext2D or you set the transform attribute on the SVG path element. If you want different transforms on different parts of the path, you need to break them into separate paths.