Skip to content

How to know the m or M point of path from all of points? #1135

Open
@penggelies07

Description

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]].

Untitled-2.svg.zip

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!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions