-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
rounded rectangle #48
Conversation
or a simpler solution would be a condition in impl VelloVector for VelloRect {
fn shape(&self) -> impl kurbo::Shape {
if self.radius == 0 { kurbo::Rect::new(...)}
else { kurbo::RoundedRect::new(...)}
}
} but im not sure which you had in mind |
yeah, I was thinking maybe just a simple if statement? haha not sure if that would worth the performance cost tho? |
im currently struggling with object safety by return different types. Seems like a new As for performance, i think it would actually be much worse if we use return different types due to dynamic dispatch rather than if we just return a |
Oh yes, of course, I have not thought of that! haha thanks for pointing it out, then I guess, the easiest solution would be the current implementation or add a new type |
I vote to keep the current implementation until linebender/kurbo#331 gets merged then rewrite with that in mind |
agreed, thanks for pointing out the PR as well :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey juz a tiny change to fix the rust fmt error, thanks!
@aymey I also wanted to point out that your changes will be moved into the new repo I created: https://github.com/voxell-tech/bevy_vello_graphics. |
related to #43
how would we do this? seems polymorphic so rust traits would be the only option right?