Is there Canvas methods equivalent to SVG methods (getPointAtLength & getTotalLength)?

Is there Canvas methods equivalent to SVG methods (getPointAtLength & getTotalLength)?

No, canvas speaks in pixels not objects.
It is possible though to use those methods without them being in the document though.

var path = document.createElementNS("http://www.w3.org/2000/svg","path");
path.setAttribute('d', 'M0,0L0,100');
console.log(path.getTotalLength());
1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.