Skip to main content

stipple_geometry/
lib.rs

1//! 2D geometry primitives for the Stipple UI toolkit.
2//!
3//! Stipple works in **logical pixels** (`f64`): device-independent units that
4//! the platform layer converts to physical device pixels using a
5//! [`ScaleFactor`]. All layout, hit-testing, and the public widget API speak
6//! logical pixels; physical pixels appear only at the `stipple-platform` /
7//! `stipple-render` boundary (see [`PhysicalSize`]).
8//!
9//! This crate is a dependency-free leaf. Interop with `oxideav-core`'s
10//! `Transform2D` lives in `stipple-render`, at the render boundary, to keep the
11//! geometry types free of any rendering dependency.
12
13#![forbid(unsafe_code)]
14
15mod affine;
16mod insets;
17mod physical;
18mod point;
19mod rect;
20mod size;
21mod vec2;
22
23pub use affine::Affine;
24pub use insets::Insets;
25pub use physical::{PhysicalSize, ScaleFactor};
26pub use point::Point;
27pub use rect::Rect;
28pub use size::Size;
29pub use vec2::Vec2;