mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-07-18 00:07:00 +02:00
add origin and align methods to Layout trait
This commit is contained in:
parent
09463649c6
commit
13c886d9e0
18 changed files with 333 additions and 248 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue