How to know the m or M point of path from all of points?
Author: penggelies07Created Dec 16, 2021Updated Dec 17, 2021
Hello, I have an svg picture like this, with M and m in the path. I can get all the points by calling Raphael.getTotalLength(path), but how can I know from which point is the path behind m.
I want to know all the absolute coordinate points of the inner border of the svg, so that I can get a data format similar to the following [[points of the outer border], [points of the inner border]].
This is how I achieved it. I can get all the points, but I can’t distinguish which are the points of the inner frame and which are the points of the outer frame.
let points = [];
for (let i = 0; i < Raphael.getTotalLength(path); i += step_point) {
const point = Raphael.getPointAtLength(path, i);
points.push(point);
}I really look forward to your answers, thank you!
Source: DmitryBaranovskiy/raphael