I cannot seem to find HTML5 Canvas arcTo
equivalent in the Raphael API.
Canvas sandbox can be found here. Raphaels' here.
The relevant bits I assume are here:
var outA2 = Math.pow(cornerX - outX, 2);
var outB2 = Math.pow(cornerY - outY, 2);
var outC = Math.sqrt(outA2 + outB2);
var inA2 = Math.pow(cornerX - inX, 2);
var inB2 = Math.pow(cornerY - inY, 2);
var inC = Math.sqrt(inA2 + inB2);
var r = Math.min(outC, inC) / 2;
// ctx.lineTo(inX, inY);
path.push(['L', inX, inY]);
// ctx.arcTo(cornerX, cornerY, outX, outY, r);
path.push(['Q', cornerX, cornerY, outX, outY]);
// ctx.lineTo(outX, outY);
path.push(['L', outX, outY]);
Where, when making the curve, I have not passed radius or alike, but I just cannot seem to find such API.
How to recreate the arcTo
result with Raphael?