svg/svgo

Convert c to q

KTibow opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
Sometimes c can be converted to q. This would be more compact.

Describe the solution you'd like
This is done by drawing two lines, one from the start to the start handle, and one from the end to the end handle. Then intersect them to find the quadratic handle.

Describe alternatives you've considered
Implement this somewhere that isn't SVGO? not sure

Additional context
Read: https://yuri.is/splines/static/QuadraticApproximation.pdf
This is not always possible and I'm not sure how to check when it is possible yet