Module geometry

Source
Expand description

Logical clip shapes and 2D primitives (Rect, Size, …).

§Examples

use ailloli_ui_core::geometry::Rect;
assert!(Rect::new(0.0, 0.0, 10.0, 10.0).contains(5.0, 5.0));

Two-dimensional geometry in logical pixel space.

Types here are used by layout, hit-testing, and clip propagation. GPU clip strategy (scissor vs stencil) is chosen in ailloli_ui_render_wgpu, not in this module.

Re-exports§

pub use clip_shape::ClipShape;
pub use constraints::Constraints;
pub use edge_insets::EdgeInsets;
pub use offset::Offset;
pub use point::Point;
pub use rect::Rect;
pub use size::Size;

Modules§

clip_shape
Axis-aligned and rounded local clip shapes.
constraints
Parent-to-child minimum and maximum layout sizes.
edge_insets
Four-sided padding and margin values.
offset
Two-dimensional translation vectors.
point
Positions in logical coordinate spaces.
rect
Axis-aligned rectangles and intersection helpers.
size
Logical width and height pairs.