-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Draw path #1089
Comments
This library doesn't do triangulation of paths in general, only convex polygons. Perhaps you could use https://github.com/nical/lyon for paths? |
@bvssvni Thanks! Can I use that with piston? |
I have not tried it yet, but believe it should work. |
Would it be possible to add support for simple paths without bringing in something like lyon? All I need is something like |
Could use this method https://github.com/PistonDevelopers/graphics/blob/master/src/triangulation.rs#L493. It generates triangles by emitting 2 points. The work is to get the edge cases right. Depending on how the corner bends, you want to "lock" one point and move the other. This could be added to the |
If I'm understanding correctly, triangles would need to be closed. Is there a way to render a path of points that wouldn't connect end-to-end? |
I don't think the quad stream function requires closing. |
Hi,
Is there a way to draw multiple points that are collected by lines? The
polygon
method fills the shape. What can I use to draw the entire path as a set of lines? Drawing each line of the path individually is extremely slow at the moment.Thanks!
The text was updated successfully, but these errors were encountered: