add origin and align methods to Layout trait

This commit is contained in:
facile pop culture reference 2026-07-10 18:24:44 +03:00
parent 09463649c6
commit 13c886d9e0
18 changed files with 333 additions and 248 deletions

View file

@ -31,9 +31,9 @@ pub trait Tall<N: Coord> {
/// Point with size.
///
/// ```
/// use tengri::space::{XY, XYWH};
/// # use tengri::*;
/// let xywh = XYWH(0u16, 0, 0, 0);
/// assert_eq!(XYWH(10u16, 10, 20, 20).center(), XY(20, 20));
/// assert_eq!(XYWH(10u16, 10, 20, 20).center(), (20, 20));
/// ```
///
/// * [ ] TODO: origin field (determines at which corner/side is X0 Y0)