benilla-re systems structs docs

ClampRectToScreen

function · ui · primitive

Address
0x509e20 · 154 bytes, up to 0x509eb9
Meaning
Moves a rectangle onto the screen keeping its size, clamping top, bottom, left, right
Confidence
verified, proof one
Finding
ui/smartrect#normalising-a-rectangle
Test
ui::geo_509e20

Finding: Normalising a rectangle in ui: the screen rectangle placement

0x509e20 moves a rectangle onto the screen [0, K1] × [0, K2] keeping its size, with the four clamps in the order top, bottom, left, right. The rectangle lands wholly inside only when it fits the screen. A rectangle taller than K2 ends at the bottom clamp (bottom 0, top its height), and a wider one at the right clamp (right K1). A NaN edge clamps nothing.

The derivation is in the doc.

Callers 2

Callees 2

Calls and jumps by a bare address, from tables/calls.tsv.