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

Method getCharWidth

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

Source from the content-addressed store, hash-verified

19 }
20
21 int Font::getCharWidth(char c) const
22 {
23 switch ( c )
24 {
25 case '\t':
26 return this->maxWidth() * 2;
27 case ' ':
28 return this->maxWidth() / 2;
29 default:
30 return this->getChar(c)->width();
31 }
32 }
33 // ----------------- GET WIDTH ---------------------
34 int Font::getTextWidth(const char *pszStr) const
35 {

Callers 2

getTextWidthMethod · 0.95
blitStringMethod · 0.80

Calls 3

maxWidthMethod · 0.95
getCharMethod · 0.95
widthMethod · 0.45

Tested by

no test coverage detected