mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-08-07 22:17:07 +02:00
make Draw::clip take drawable instead of fn
This commit is contained in:
parent
cc4a428143
commit
4c25dcc702
9 changed files with 35 additions and 33 deletions
|
|
@ -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)
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue