add Screen::area and ::clip to implement Align

This commit is contained in:
facile pop culture reference 2026-07-15 12:57:53 +03:00
parent ddc53b23c2
commit 482b624169
7 changed files with 85 additions and 37 deletions

View file

@ -33,3 +33,8 @@ pub trait Coord: Send + Sync + Copy
/// Convert to [AtomicUsize].
fn atomic (self) -> AtomicUsize { AtomicUsize::new(self.into()) }
}
/// TUI works in u16 coordinates.
impl Coord for u16 {
fn plus (self, other: Self) -> Self { self.saturating_add(other) }
}