Color and geometry API
Declared by <huxerui/color.h> and <huxerui/geometry.h>.
Linear component value with public red, green, blue, and alpha floats. Rgb(int, int, int, float alpha = 1) converts 8-bit RGB; Transparent(), Black(), and White() provide constants. Equality compares components.
Horizontal or Vertical.
Point and Size
Section titled “Point and Size”Point{x, y} and Size{width, height} are logical-coordinate values with equality.
Public x, y, width, and height; Contains, IsEmpty, Intersects, and Intersection query geometry. Equality compares fields.
CornerRadii
Section titled “CornerRadii”Public top_left, top_right, bottom_right, and bottom_left. Construct uniformly or per corner; Top(value) rounds top corners and IsUniform() tests equality.
Transform2D
Section titled “Transform2D”Affine matrix fields m11, m12, m21, m22, translate_x, and translate_y. IsIdentity, Apply, and fallible Inverse operate on points.
EdgeInsets
Section titled “EdgeInsets”Public top, right, bottom, and left. All and Symmetric(horizontal, vertical) construct common values; Horizontal() and Vertical() sum axes.
Constraints
Section titled “Constraints”Public min/max width and height. Methods: Constrain, ConstrainWidth, ConstrainHeight, HasBoundedWidth, HasBoundedHeight, Loose, LooseWidth, LooseHeight, TightWidth, TightHeight, and Deflate.
Units and validity
Section titled “Units and validity”Shared geometry uses logical units. Platform adapters convert device pixels, screen coordinates, and DPI at their boundaries.
Negative or inverted values are not normalized implicitly; constructors and methods document the few operations that clamp or return an empty intersection.
Transform2D::Inverse() returns an empty optional for a singular transform.
Use EdgeInsets for resolved geometry and the Padding modifier for a declarative view property.
Use CornerRadii when corners may differ and CornerRadius(float) only for the uniform modifier shorthand.

