Skip to content

How to stretch one svg path ? #69

@liyihongcug

Description

@liyihongcug

I can use sample way to make 2d svg picuture.
But I need 3d path.

final String path = "M22.395-127.223c-4.492,11.344-4.688,33.75,0,44.883"
+ "c-11.328-4.492-33.656-4.579-44.789,0.109c4.491-11.354,4.688-33.75,0-44.892"
+ "C-11.066-122.63,11.262-122.536,22.395-127.223z";

My requirement is to add one height value(z=50) in all svg path points.
Thus (22.395,127.223) ==========> (22.395,127.223,50).
Other points are likes above.

But I find it doesn't work in SVGPathFragment.java.
1 for (int j = 0; j <= subdiv; j++) {
Vector3 point = new Vector3();
subPath.calculatePoint(point, (float) j / (float) subdiv);
point.z=50; // I add it
points.add(point);
}
2 I don't know how to stretch it to polygon whose height is 100. (please stretch it)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions