ori_core/layout/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//! Layout of [`View`](crate::view::View)s.

mod affine;
mod alignment;
mod axis;
mod justify;
mod matrix;
mod padding;
mod point;
mod rect;
mod size;
mod space;
mod vector;

pub use affine::*;
pub use alignment::*;
pub use axis::*;
pub use justify::*;
pub use matrix::*;
pub use padding::*;
pub use point::*;
pub use rect::*;
pub use size::*;
pub use space::*;
pub use vector::*;

/// A constant used to indicate that a dimension should fill the available space.
pub const FILL: f32 = f32::INFINITY;

/// Convert a from points to pixels.
pub fn pt(x: f32) -> f32 {
    x * 96.0 / 72.0
}