benilla-re systems structs docs

SizingRectFitBottom

function · gx · primitive

Address
0x5910e0 · 61 bytes, up to 0x59111c
Signature
void __thiscall (int32_t *this)
Meaning
Sets a drag rectangle's bottom to its top plus its width over the aspect ratio, unless the ratio is 0
Confidence
verified, proof one
Finding
gx/window#window-sizing
Test
gx::aspect_fit_max_x_matches_binary, gx::sizing_rect_helpers_difftest, gx::sizing_wm_sizing_difftest

Finding: Window sizing in gx: window

On WM_SIZING both procedures adjust the drag rectangle lParam points to (the whole window, in screen coordinates) in place and return 1; one of zero width or height returns 0 unchanged. On {top, left, bottom, right}, with the ratio r = [0xc0ef60] (width over height of the format, 0 unless it constrains the aspect, device.md) and the minimum 320 by 240 (0xc0ef64, 0xc0ef68), the dragged edge runs these steps in order; any other wParam changes nothing.

wParamedgesteps
1leftmin left, fit top
2rightmin right, fit bottom
3topmin top, fit left
4top leftmin top, min left, fit top, fit left
5top rightmin top, min right, fit top, fit right
6bottommin bottom, fit right
7bottom leftmin bottom, min left, fit left, fit bottom
8bottom rightmin bottom, min right, fit bottom, fit right

The derivation is in the doc.

Callers 2

Callees 1

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