Pomax / svg-path-reverse

This is a JavaScript SVG path to "something" converter, turning a path into hookable graphics instructions for arbitrary conversion
59 stars 15 forks source link

Fix normalising smooth cubic Bézier curves without a previous curve #12

Closed Eschon closed 2 years ago

Eschon commented 2 years ago

Fixes #11

choose first control point for smooth cubic bézier curves based on the previous command

if the previous command was another bézier curve use the last control point reflected over the current point otherwise use the current point

Pomax commented 2 years ago

@Eschon one more thought: this probably also applies to the t operator for quadratic curves, would it be too much to ask you to add the same changes there with a quadratic test case?

Eschon commented 2 years ago

@Pomax sure no problem. I've adapted the fix for quadratic curves

Pomax commented 2 years ago

v1.5.0 released