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

Is it possible to combine multiple shapes and treat them as a single shape? #150

Open
lordbenedikt opened this issue Mar 28, 2022 · 5 comments

Comments

@lordbenedikt
Copy link

I'm using this library to draw debug_shapes. Some of the shapes can't be represented by any of the provided shape types alone. Could they be combined though, it would perfectly work. Is it possible to do that?

@zimond
Copy link

zimond commented May 7, 2022

You can use a PathBuilder

@lordbenedikt
Copy link
Author

What if I need a shape that isn't made up of a continuous line i.e. an X?

@zimond
Copy link

zimond commented Jun 16, 2022

@lordbenedikt you could just call .move_to(), each call starts a new segment. This is identical to the concept of path building in the SVG spec.

@lordbenedikt
Copy link
Author

@zimond thanks, I didn't know about that!

@enaut
Copy link
Contributor

enaut commented Aug 22, 2022

But it would be great to impl Add<PathBuilder> for PathBuilder so I could predefine two unbuilt paths and combine the shapes. Or do I completely misunderstand the concept?

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

3 participants