ScummVM API documentation
Ultima::Shared::Gfx::Font Class Reference

Public Member Functions

 Font (const byte *data, size_t startingChar=0, size_t charCount=256)
 
int writeString (Graphics::ManagedSurface &surface, const Common::String &msg, Point &pt, byte color, byte bgColor=0)
 
void writeChar (Graphics::ManagedSurface &surface, unsigned char c, Point &pt, byte color, byte bgColor=0)
 
uint charWidth (char c) const
 
uint stringWidth (const Common::String &msg) const
 
uint lineHeight () const
 

Member Function Documentation

◆ writeString()

int Ultima::Shared::Gfx::Font::writeString ( Graphics::ManagedSurface surface,
const Common::String msg,
Point pt,
byte  color,
byte  bgColor = 0 
)

Write out a string

◆ writeChar()

void Ultima::Shared::Gfx::Font::writeChar ( Graphics::ManagedSurface surface,
unsigned char  c,
Point pt,
byte  color,
byte  bgColor = 0 
)

Draw a character

◆ charWidth()

uint Ultima::Shared::Gfx::Font::charWidth ( char  c) const

Return the width of a character

◆ stringWidth()

uint Ultima::Shared::Gfx::Font::stringWidth ( const Common::String msg) const

Return the width of a string

◆ lineHeight()

uint Ultima::Shared::Gfx::Font::lineHeight ( ) const

Returns the height of the font


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