PixelAlignY
function · ui · primitive
- Address
0x766750· 162 bytes, up to0x7667f1- 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
- PlaceChatBubble ui
- CSimpleFontString::FitText ui
- CSimpleEditBox::GetIndexAtPoint ui
- CSimpleEditBox::PlaceCaret ui
- CSimpleEditBox::PlaceSelectionPiece ui
- CSimpleMessageFrame::LayoutLines ui
- CSimpleMessageScrollFrame::LayoutLines ui
- CSimpleHTML::AddTextBlock ui
Callees 4
- __ftol crt
- DivideByScreenScaleY screencoord
- MultiplyByScreenScaleY screencoord
- GxCapsScreenSize gx
Calls and jumps by a bare address, from tables/calls.tsv.