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

Method getTextHeight

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

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

Source from the content-addressed store, hash-verified

46 }
47 // ----------------- GET WIDTH ---------------------
48 int Font::getTextHeight(const char *pszStr) const
49 {
50 // verify valid size index
51 if ( !pszStr || !this->isValid() )
52 return 0;
53
54 int size = this->Ymax;
55 for ( ; *pszStr; ++pszStr )
56 {
57 if ( *pszStr == '\n' )
58 size += this->Ymax;
59 }
60 return size;
61 }
62
63 int Font::maxWidth() const
64 {

Callers 1

blitStringMethod · 0.80

Calls 1

isValidMethod · 0.95

Tested by

no test coverage detected