Compositor-agnostic geometry helper utilities. More...
Functions | |
| QRect | snapToRect (const QRectF &rf) |
| Convert QRectF to QRect with edge-consistent rounding. | |
Compositor-agnostic geometry helper utilities.
Shared geometry functions used by all compositor plugins.
|
inline |
Convert QRectF to QRect with edge-consistent rounding.
Unlike QRectF::toRect() which rounds x, y, width, height independently, this rounds the edges (left, top, right, bottom) and derives width/height from the rounded edges. This ensures adjacent zones sharing an edge always produce exactly the configured gap between them, even when fractional scaling (e.g. 1.2x) produces non-integer zone boundaries.