valo_geometry/lib.rs
1//! Pure 2D math for valo: points, rects, affine transforms, color.
2//! Zero dependencies (serde optional) — usable anywhere, no GPU, no unicode.
3//!
4//! Conventions (fixed across all of valo):
5//! - y-down, origin top-left, units are logical pixels until a transform says otherwise.
6//! - The public transform is a full 4×4 (glam-backed); the renderer folds depth in (
7//! is a renderer concern — clips consume z, the user never sees it).
8//! - `Color` is straight (unpremultiplied) sRGB; premultiplication happens at the GPU
9//! boundary. Blending is performed in sRGB space (the CSS/Skia-compatible look) —
10//! linear/wide-gamut blending is deliberately deferred.
11
12mod color;
13mod matrix;
14mod measure;
15mod path;
16mod point;
17mod rect;
18mod stroke;
19mod winding;
20
21pub use color::Color;
22pub use matrix::{Matrix, MatrixKind};
23pub use measure::{ContourMeasure, PathSample};
24pub use path::{
25 constrain_radii, constrain_radii_elliptical, local_tolerance, Contour, FillRule, Path,
26 PathBuilder, Winding,
27};
28pub use point::{Point, Size};
29pub use rect::Rect;
30pub use stroke::{dash_contours, stroke_contains, stroke_strip, Cap, Dash, Join, Stroke};