Search code examples
svgpathcoordinate-transformation

Converting relative s path into relative c path in svg


i was wondering how is the first relative control point of the "s" command calculated in respect to the previous command "c". Lets say, how would i do this if i have c(-7.3 43 22.5 109 26.6 118.4)s(7.3 15.8 8.3 17.7)?

What would the equivavlent c (xy xy xy) c (xy xy xy) be? And how is it calculated?


Solution

  • The answer to your question can be found where the 's' and 'c' path commands are defined - the SVG specification.

    http://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands