FontMethods::GetShadowOffset
function · ui · primitive
- Address
0x79fad0· 106 bytes, up to0x79fb39- Meaning
- Returns the shadow offset converted from layout units to Lua units
- Confidence
- verified, proof one
- Finding
- ui/fontmethods#alpha-spacing-and-offsets
- Test
ui::get_scaled_pair_79fad0,ui::shadow_offset_default_79fad0
Finding: Alpha, spacing and offsets in ui: font accessors from Lua
Font:SetAlpha(a) stores the low byte of the truncated product of a and 255 in the top byte of the text colour, with no clamp and
no rounding, and Font:GetAlpha() returns that byte times 1/255. SetSpacing(s), SetShadowOffset(x, y) and the font height
convert between Lua units and layout units with the screen scale: a Lua value v is stored as K1 · float(v / (1024 · A)) and read
back as float(1024 · A · stored) / K1, with A from GetScaledScreenAspect() and K1 the x scale (1 and 0.8 at 4:3).
The derivation is in the doc.
Callers 5
- ScrollingMessageFrame::GetShadowOffset ui
- MessageFrame::GetShadowOffset ui
- SimpleHTML::GetShadowOffset ui
- EditBox::GetShadowOffset ui
- FontInstance::GetShadowOffset ui
Callees 3
- GetScaledScreenAspect screencoord
- DivideByScreenScaleX screencoord
- lua_pushnumber lua
Calls and jumps by a bare address, from tables/calls.tsv.