1681-engine / ui / snapRect
Function: snapRect() ​
ts
function snapRect(r, on?): Rect;Defined in: src/ui/layout/geometry.ts:44
A rect with its edges (not its size) rounded: two neighbours that touch before snapping still touch after, where rounding x and width apart could open or overlap a pixel between them.
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
r | Rect | undefined |
on | boolean | true |