Pure-function geometry helpers: zone clamping, overlap resolution, per-window minimum-size enforcement, overlay-coordinate projection, and the canonical rect-to-JSON encoder.
Pure-function corrections shared by the snap engine and the autotile engine: clamp to screen, eliminate overlaps, grow zones to respect window minimum sizes, project geometry into an overlay window's local coordinate system.
Input rects in, output rects out, with no Qt objects, no signals, and no allocation beyond the result vector. Headless geometry tests link the lib without GUI infrastructure.
| Type | Purpose |
|---|---|
| PhosphorGeometry::availableAreaToOverlayCoordinates | Project an "available-area" rect into an overlay window's coords |
| PhosphorGeometry::snapToRect | QRectF → QRect with consistent rounding |
| PhosphorGeometry::enforceMinSizes | Grow zones to fit per-window minimum sizes by stealing surplus from neighbours, then resolve overlap |
| PhosphorGeometry::clampZonesToScreen | Position-only clamp that shifts zones so each window's effective rect stays on screen, sizes preserved |
| PhosphorGeometry::removeRectOverlaps | Resolve residual overlap between zones (used after min-size growth) |
| PhosphorGeometry::rectToJson | Canonical rect-string format for D-Bus + JSON roundtrip |
| PhosphorGeometry::JsonKeys | Key constants for the rect-JSON encoder |