MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / calculateExtent

Method calculateExtent

src/components/TextComponent.cpp:82–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void TextComponent::calculateExtent()
83{
84 std::shared_ptr<Font> font = getFont();
85
86 if(mAutoCalcExtent.x())
87 {
88 mSize = font->sizeText(mText);
89 }else{
90 if(mAutoCalcExtent.y())
91 {
92 mSize[1] = font->sizeWrappedText(mText, getSize().x()).y();
93 }
94 }
95}

Callers

nothing calls this directly

Calls 2

sizeTextMethod · 0.80
sizeWrappedTextMethod · 0.80

Tested by

no test coverage detected