Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to stretch one svg path ? #69

Open
liyihongcug opened this issue Aug 25, 2016 · 0 comments
Open

How to stretch one svg path ? #69

liyihongcug opened this issue Aug 25, 2016 · 0 comments

Comments

@liyihongcug
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant