Link: Official SVG Reference
Hello men and women, I am having some trouble with shorthand (defined by S or s in pathdata) bezier curves defined as SVG paths. Specifically, how to calculate the first control point.
Say we have one curveto command with control points (X1, Y1)
and (X2, Y2)
, endpoint (X3, Y3)
and starting point (X0, Y0)
.
Next comes a shorthand/smooth curve command with a first control point (X4, Y4)
and second control point (X5, Y5)
. Assume everything is in absolute coordinates for simplicity.
How would one calculate the unknown first control point (X4, Y4)
from the other known points?