TextBlockCreate
function · unassigned
- Address
0x44d420· 401 bytes, up to0x44d5b0- Signature
void * __fastcall (void *font, const char *text, const void *colour, const float *position, float size, float width, float height, uint32_t word, float extra, float spacing)- Meaning
- Creates an HTEXTBLOCK handle on an engine string, unscaling its geometry and splitting its word into flags
- Confidence
- verified, proof one
- Finding
- ui/fonttext#text-block-creation
Finding: Text block creation in ui: font string internals
TextBlockCreate(font, text, colour, position, size, width, height, word, extra, spacing) makes an
HTEXTBLOCK handle on a new engine string. It fails with error 0x57 and 0 for a null font or text.
It unscales the position's x and y, divides the size, height and spacing by the y screen scale and
the width and extra by the x screen scale, and passes the word on as three values:
| word bits | engine value |
|---|---|
| 0x1, 0x2, 0x4, none | horizontal justification 0, 1, 2, 1 (0x4 first, then 0x2, then 0x1) |
| 0x8, 0x20, 0x10, none | vertical justification 0, 2, 1, 1 (0x8 first, then 0x20, then 0x10) |
| 0x40, 0x80, 0x100, 0x200, 0x400, 0x800 | flags 0x2, 0x800, 0x1, 0x4, 0x8, 0x10 |
| 0x1000, 0x2000, 0x4000, 0x8000 | flags 0x40, 0x100, 0x200, 0x400 |
The derivation is in the doc.
Callers 1
Callees 7
- UnscaleScreenXY screencoord
- DivideByScreenScaleX screencoord
- DivideByScreenScaleY screencoord
- CreateHandle base
- GxuFontCreateString unassigned
- SMemAlloc storm
- SErrSetLastError storm
Calls and jumps by a bare address, from tables/calls.tsv.