MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / draw

Method draw

src/Interface/NumberText.cpp:249–265  ·  view source on GitHub ↗

* Draws all the digits in the number. */

Source from the content-addressed store, hash-verified

247 * Draws all the digits in the number.
248 */
249void NumberText::draw()
250{
251 Surface::draw();
252 std::ostringstream ss;
253 ss << _value;
254 std::string s = ss.str();
255 int x = 0;
256 for (std::string::iterator i = s.begin(); i != s.end(); ++i)
257 {
258 _chars[*i - '0']->setX(x);
259 _chars[*i - '0']->setY(0);
260 _chars[*i - '0']->blit(this);
261 x += _chars[*i - '0']->getWidth() + 1;
262 }
263
264 this->offset(_color);
265}
266
267}

Callers

nothing calls this directly

Calls 5

setXMethod · 0.45
setYMethod · 0.45
blitMethod · 0.45
getWidthMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected