svg.path.js
svg.path.js copied to clipboard
Improving the Arcto function
I am trying the svg.path.js plugin and want to draw an arc using it, since svgjs does not provide this feature out of the box, as it seems.
Result should look like this:

However, the Arcto function is for ellipses and I obviously have problems in "reducing" the parameters to a simple arc on a circle. A(rx, ry, xAxisRotate, outerinner, clockwise, endpoint)
The hardest part is the endpoint with x and y coordinate...
I would love to see another implementation, that I know from easeljs:
draw.arc(x, y, circle_radius, angle_start, angle_end, anticlockwise);
Or, if this implementation is not possible or planned, then: How to get the endpoint. I tried to use Math.sin() and Math.cos() to calculate it, but it was just messed up :/
PS: Just found this https://stackoverflow.com/q/5736398/1066234 but seems not that easy.
This would be super-handy. I've always longed for the Canvas API's arc method in SVG.