-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Canvas ui element #113
Comments
Maybe we could make a
Well, it's just that I do not think there is a trait that fits all the different drawable resources. For instance, I also try to avoid adding abstractions just because they may seem nice. I like to have a couple or more use cases first, and I haven't needed such an abstraction yet! |
For an ui element made out of
graphics::Canvas
, is it better tobuild a new
ui::Canvas
make it so that
ui::Image
can accept eithergraphics::Image
orgraphics::Canvas
make it so that there's a
Drawable
trait that hasfn draw<Q: IntoQuad>(&self, quad: Q, target: &mut Target)
, so thatui::Image
accepts a&dyn Drawable
trait object.1 is the most logical given the way the library is currently laid out, but involves duplication. But I think
ui::Image
shouldn't care whether it's displaying an image or a canvas, so 2) sounds better.3 seems like a big departure from the way the lib is currently designed, but I'm curious on why coffee doesn't provide such trait already.
The text was updated successfully, but these errors were encountered: