benilla-re systems structs docs

PixelAlignY

function · ui · primitive

Address
0x766750 · 162 bytes, up to 0x7667f1
Meaning
Rounds a vertical length up to whole device pixels
Confidence
verified, proof two
Finding
ui/regions#pixel-alignment
Test
ui::glue_765_766750_ratio_round_y

Finding: Pixel alignment in ui: regions in the layout

PixelAlignX(x) and PixelAlignY(y) round a layout length up to a whole number of device pixels. A length below 2^-22 in size, and any length on a viewport of no width or height, comes back unchanged. Otherwise the length is divided by the horizontal or vertical screen scale, multiplied by the viewport's size in pixels, increased by 0.99999 when it is positive, truncated toward zero, divided by the pixel size again and multiplied by the screen scale. A positive length therefore gains a pixel unless it already is a whole number of pixels, and a negative length is truncated.

The derivation is in the doc.

Callers 8

Callees 4

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