make Draw::clip take drawable instead of fn

This commit is contained in:
facile pop culture reference 2026-08-03 11:40:43 +03:00
parent cc4a428143
commit 4c25dcc702
9 changed files with 35 additions and 33 deletions

View file

@ -16,6 +16,7 @@ pub struct Area<S: Screen, T: Draw<S>>(
pub Option<XYWH<S::Unit>>,
pub T
);
impl_draw!(<S: Screen, T: Draw<S>,>|self: Area<S, T>, to: S|{
to.clip(self.0, |to|self.1.draw(to))
to.clip(self.0, self.1)
});