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

Add a 'dimensions' method to the 'Drawable' trait #557

Closed
ozkriff opened this Issue Jan 18, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@ozkriff
Copy link
Contributor

ozkriff commented Jan 18, 2019

I need my code to be generic over Text and Image. In GGEZ v0.4 I was using .into_inner() method to convert Text to Image and just worked with images afterward, but there's no easy way to do this with the new font rendering.

I can use Box<Drawable> (though, see #556) to draw the items, but I also need to know their size to use them in zgui's widgets (for layout restructuring and mouse click handling). The Drawable trait doesn't provide any method like dimensions atm.

@icefoxen icefoxen added this to the 0.5 milestone Feb 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.