ScummVM API documentation
Access::Font Class Reference
Inheritance diagram for Access::Font:
Access::AmazonFont Access::MartianFont

Public Member Functions

virtual ~Font ()
 
int charWidth (char c)
 
int stringWidth (const Common::String &msg)
 
bool getLine (Common::String &s, int maxWidth, Common::String &line, int &width)
 
void drawString (BaseSurface *s, const Common::String &msg, const Common::Point &pt)
 
int drawChar (BaseSurface *s, char c, Common::Point &pt)
 

Static Public Attributes

static byte _fontColors [4]
 

Protected Member Functions

 Font (byte firstCharIndex)
 

Protected Attributes

byte _firstCharIndex
 
int _bitWidth
 
int _height
 
Common::Array< Graphics::Surface_chars
 

Constructor & Destructor Documentation

◆ Font()

Access::Font::Font ( byte  firstCharIndex)
protected

Constructor

◆ ~Font()

virtual Access::Font::~Font ( )
virtual

Destructor

Member Function Documentation

◆ charWidth()

int Access::Font::charWidth ( char  c)

Get the width of a given character

◆ stringWidth()

int Access::Font::stringWidth ( const Common::String msg)

Get the width of a given string

◆ getLine()

bool Access::Font::getLine ( Common::String s,
int  maxWidth,
Common::String line,
int &  width 
)

Get a partial string that will fit in a given width

Parameters
sSource string. Modified to remove line
maxWidthMaximum width allowed
lineOutput line
widthCalculated width of returned line
Returns
True if last line

◆ drawString()

void Access::Font::drawString ( BaseSurface s,
const Common::String msg,
const Common::Point pt 
)

Draw a string on a given surface

◆ drawChar()

int Access::Font::drawChar ( BaseSurface s,
char  c,
Common::Point pt 
)

Draw a character on a given surface


The documentation for this class was generated from the following file: