MCPcopy Create free account
hub / github.com/bwapi/bwapi / getTextWidth

Method getTextWidth

bwapi/BWAPI/Source/BW/Font.cpp:34–46  ·  view source on GitHub ↗

----------------- GET WIDTH ---------------------

Source from the content-addressed store, hash-verified

32 }
33 // ----------------- GET WIDTH ---------------------
34 int Font::getTextWidth(const char *pszStr) const
35 {
36 // verify valid size index
37 if ( !pszStr || !this->isValid() )
38 return 0;
39
40 // Retrieve size
41 int size = 0;
42 for ( ; *pszStr; ++pszStr )
43 size += this->getCharWidth(*pszStr);
44
45 return size;
46 }
47 // ----------------- GET WIDTH ---------------------
48 int Font::getTextHeight(const char *pszStr) const
49 {

Callers 1

blitStringMethod · 0.80

Calls 2

isValidMethod · 0.95
getCharWidthMethod · 0.95

Tested by

no test coverage detected