benilla-re systems structs docs

ScreenToPixelHeight

function · font · primitive

Address
0x5c6fa0 · 99 bytes, up to 0x5c7002
Signature
float __fastcall (int raw, float fraction)
Meaning
Converts a height fraction to rounded pixels
Confidence
verified, proof one
Name from
the community database (idb)
Finding
font/metrics#screen-and-pixel-units
Test
font::screen_to_pixel_height_difftest

Finding: Screen and pixel units in font: scaling, advances and metrics

The layout measures in fractions of the screen height. 0xc2b9a0 holds the viewport height in pixels and 0xc2b9a4 its width. 0x5c6fa0(raw, v) converts a height fraction to pixels (rounded half away from zero), 0x5c7010 does the same against the width, 0x5c7080(pixels) converts back and 0x5c2540(font) returns a font's natural height pixelSize / screenHeight.

The derivation is in the doc.

Callers 8

Callees 1

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