Translate SVG path arcs to OpenXML coordinates
$30-250 USD
Paid on delivery
would like a function in Javascript that does the opposite of what this article does.
SVG tags specify arcs as M <x> <y> A <rx> <ry> <x-axis-rot> <large-arc-flag> <sweep-flag> <x1> <y1>
OpenXML <a:arcTo> specifies arc with a different parameters:
<a arcTo w=<width> h=<height> stAng=<startAngle> swAng=<sweepAngle> >
This article has C# code that goes from OpenXML parameters to SVG, [login to view URL]
I would like a Javascript function that does the reverse. It's basically analytic trigonometry, but its a bit involved.
I don't need to own the code, just an open source license to it. So you're free to post the solution in a blog, whatever too.
Deliverables
Javascript function that
function arcSVGtoOpenXML ( rx, ry, xAxisRot, largeArcFlag, sweepFlag, x, y) {
... magic
return {h,w, stAng, swAng}
}
Acceptance criteria will be successfully translating the two arcs in this example:
<path d="M 162.70987041992964 178.91665418743597 l -106.08334581256402 0 a 106.08334581256402 106.08334581256402 0 1 0 212.16669162512804 0 a 125 50 30 0 1 -212.16669162512804 0 "/>`
Project ID: #33284736
About the project
6 freelancers are bidding on average $203 for this job
Hi there, I can work with your description of Translate SVG path arcs to OpenXML coordinates that you have provided including JavaScript and SVG . I am a full stack developer with 4+ years of experience in both front-e More