CGxString
struct · font · 196 bytes
- Meaning
- Holds a string: text, size, box, justification, colours and layout
- Confidence
- verified, proof one
- Finding
- font/string#string-object
Finding: String object in font: strings and their layout
The fields the functions of this doc load and store:
| offset | holds |
|---|---|
+0x00, +0x10 | links: global or pool string list; the font's string list |
+0x18, +0x1c | the size; the size clamped to two device pixels |
+0x20 to +0x28 | the position, 3 floats |
+0x2c to +0x38 | main colour, shadow colour (alpha at +0x2f, +0x33), shadow offsets |
+0x3c, +0x40 | the box width and height |
+0x44 to +0x4c | the font; the text buffer; its capacity |
+0x50 to +0x5c | vertical and horizontal justification (0 to 2), line spacing, flags |
+0x68, +0x6c | the selection range, −1 when none |
+0x70 to +0x78 | the screen anchor |
+0x7c to +0x90 | the hyperlink region array and the layout's counts |
+0x9c, +0xa0 | laid-out line count (0 for no layout); eight per-line buffers |
+0xc0 | frames since the last layout |
The derivation is in the doc.
Fields 21
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 8 | void *[2] | m_link | Holds the link in the global string list or the pool | verified, proof one | font/string#string-object |
0x0010 | 8 | void *[2] | m_fontLink | Holds the link in the font's string list | verified, proof one | font/string#string-object |
0x0018 | 4 | float | m_size | Holds the size, or the font's natural height | verified, proof one | font/string#string-object |
0x001c | 4 | float | m_clampedSize | Holds the size raised to two device pixels | verified, proof one | font/string#string-object |
0x0020 | 12 | float[3] | m_position | Holds the position | verified, proof one | font/string#string-object |
0x002c | 4 | uint32_t | m_color | Holds the main colour; byte 3 is the alpha | verified, proof one | font/string#string-object |
0x0030 | 4 | uint32_t | m_shadowColor | Holds the shadow colour; byte 3 is the alpha | verified, proof one | font/string#string-object |
0x0034 | 8 | float[2] | m_shadowOffset | Holds the shadow offsets | verified, proof one | font/string#string-object |
0x003c | 4 | float | m_boxWidth | Holds the box width | verified, proof one | font/string#string-object |
0x0040 | 4 | float | m_boxHeight | Holds the box height | verified, proof one | font/string#string-object |
0x0044 | 4 | CGxFont * | m_font | Holds the font | verified, proof one | font/string#string-object |
0x0048 | 4 | char * | m_text | Holds the text buffer | verified, proof one | font/string#string-object |
0x004c | 4 | uint32_t | m_textCapacity | Holds the capacity of the text buffer | verified, proof one | font/string#string-object |
0x0050 | 4 | uint32_t | m_justifyV | Holds the vertical justification, 0 to 2 | verified, proof one | font/string#string-object |
0x0054 | 4 | uint32_t | m_justifyH | Holds the horizontal justification, 0 to 2 | verified, proof one | font/string#string-object |
0x0058 | 4 | float | m_lineSpacing | Holds the line spacing | verified, proof one | font/string#string-object |
0x005c | 4 | uint32_t | m_flags | Holds the string flags; bit 7 pre-snapped, bit 0 shadow | verified, proof one | font/string#string-object |
0x0070 | 12 | float[3] | m_anchor | Holds the screen anchor | verified, proof one | font/string#string-object |
0x009c | 4 | uint32_t | m_lineCount | Holds the laid-out line count, 0 without a layout | verified, proof one | font/string#string-object |
0x00a0 | 32 | void *[8] | m_lineBuffers | Holds the eight per-line quad buffers | verified, proof one | font/string#string-object |
0x00c0 | 4 | uint32_t | m_age | Holds the frames since the layout was last used | verified, proof one | font/string#string-object |