MCPcopy Create free account
hub / github.com/axmolengine/axmol / internalCalcStringWidth

Function internalCalcStringWidth

core/ui/UITextFieldEx.cpp:168–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168static float internalCalcStringWidth(std::string_view s, std::string_view fontName, float fontSize)
169{
170 auto label = _createLabel(std::string{s}, fontName, fontSize);
171 return label->getContentSize().width;
172}
173
174static std::string internalUTF8MoveLeft(std::string_view utf8Text, int length /* default utf8Text.length() */)
175{

Callers 4

setTextFontNameMethod · 0.85
setTextFontSizeMethod · 0.85
__moveCursorMethod · 0.85
__moveCursorToMethod · 0.85

Calls 2

_createLabelFunction · 0.85
getContentSizeMethod · 0.45

Tested by

no test coverage detected