MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / UpdateWidth

Method UpdateWidth

src/textbuf.cpp:298–301  ·  view source on GitHub ↗

Update pixel width of the text. */

Source from the content-addressed store, hash-verified

296
297/** Update pixel width of the text. */
298void Textbuf::UpdateWidth()
299{
300 this->pixels = GetStringBoundingBox(this->buf, FS_NORMAL).width;
301}
302
303/** Update pixel position of the caret. */
304void Textbuf::UpdateCaretPosition()

Callers 4

DeleteCharMethod · 0.95
InsertCharMethod · 0.95
InsertStringMethod · 0.95
UpdateSizeMethod · 0.95

Calls 1

GetStringBoundingBoxFunction · 0.85

Tested by

no test coverage detected