fix(draw): mismatches
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
same mf who else 2026-03-25 22:39:39 +02:00
parent 30d378a6ee
commit bea88ac58d
5 changed files with 27 additions and 15 deletions

View file

@ -90,11 +90,14 @@ pub const fn either <T: Screen> (condition: bool, a: impl Draw<T>, b: impl Draw<
/// ```
pub trait Screen: Space<Self::Unit> + Send + Sync + Sized {
type Unit: Coord;
/// Render drawable in area specified by `area`
fn place <'t, T: Draw<Self> + ?Sized> (
&mut self, content: &'t T, area: Option<XYWH<Self::Unit>>
/// Render drawable in area.
fn place <'t, T: Draw<Self> + ?Sized> (&mut self, content: &'t T) {
self.place_at(self.xywh(), content)
}
/// Render drawable in subarea specified by `area`
fn place_at <'t, T: Draw<Self> + ?Sized> (
&mut self, area: XYWH<Self::Unit>, content: &'t T
) {
let area = area.unwrap_or_else(||self.xywh());
unimplemented!()
}
}