When drawing onto a resizable window, it's useful to know the current window size. Right now, I get it by storing the current size in my Handler and updating it on on_draw, but it would perhaps be more natural to have something like
impl Graphics2D {
fn size(&self) -> Vec2;
}
Just so that one doesn't need to think about converting between integral pixels and float coordinates graphics is using for most stuff.
When drawing onto a resizable window, it's useful to know the current window size. Right now, I get it by storing the current size in my Handler and updating it on
on_draw
, but it would perhaps be more natural to have something likeJust so that one doesn't need to think about converting between integral pixels and float coordinates graphics is using for most stuff.