MCPcopy Create free account
hub / github.com/dborth/fceugx / GetTextWidth

Method GetTextWidth

source/gui/gui_text.cpp:197–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197int GuiText::GetTextWidth()
198{
199 if(!text)
200 return 0;
201
202 if(currentSize != size)
203 {
204 ChangeFontSize(size);
205
206 if(!fontSystem[size])
207 fontSystem[size] = new FreeTypeGX(size);
208
209 currentSize = size;
210 }
211 return fontSystem[size]->getWidth(text);
212}
213
214void GuiText::SetWrap(bool w, int width)
215{

Callers

nothing calls this directly

Calls 2

ChangeFontSizeFunction · 0.85
getWidthMethod · 0.80

Tested by

no test coverage detected