ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <bdf.h>

Inheritance diagram for Graphics::BdfFont:
Collaboration diagram for Graphics::BdfFont:

List of all members.

Public Member Functions

 BdfFont (const BdfFontData &data, DisposeAfterUse::Flag dispose)
 ~BdfFont ()
virtual int getFontHeight () const
 Query the height of the font.
virtual int getMaxCharWidth () const
 Query the maximum width of the font.
virtual int getCharWidth (uint32 chr) const
 Query the width of a specific character.
virtual void drawChar (Surface *dst, uint32 chr, int x, int y, uint32 color) const
 Draw a character at a specific point on a surface.
const char * getFamilyName () const
const char * getFontSlant () const
int getFontSize () const

Static Public Member Functions

static BdfFontloadFont (Common::SeekableReadStream &stream)
static bool cacheFontData (const BdfFont &font, const Common::String &filename)
static BdfFontloadFromCache (Common::SeekableReadStream &stream)
static BdfFontscaleFont (BdfFont *src, int newSize)

Private Member Functions

int mapToIndex (uint32 ch) const

Private Attributes

const BdfFontData _data
const DisposeAfterUse::Flag _dispose

Detailed Description

Definition at line 61 of file bdf.h.


Constructor & Destructor Documentation

Graphics::BdfFont::BdfFont ( const BdfFontData data,
DisposeAfterUse::Flag  dispose 
)

Definition at line 33 of file bdf.cpp.

Graphics::BdfFont::~BdfFont (  ) 

Definition at line 37 of file bdf.cpp.


Member Function Documentation

bool Graphics::BdfFont::cacheFontData ( const BdfFont font,
const Common::String filename 
) [static]

Definition at line 567 of file bdf.cpp.

void Graphics::BdfFont::drawChar ( Surface dst,
uint32  chr,
int  x,
int  y,
uint32  color 
) const [virtual]

Draw a character at a specific point on a surface.

Note that the point describes the top left edge point where to draw the character. This can be different from top left edge point of the character's bounding box! For example, TTF fonts sometimes move characters like 't' one (or more) pixels to the left to create better visual results. To query the actual bounding box of a character use getBoundingBox.

See also:
getBoundingBox

The Font implemenation should take care of not drawing outside of the specified surface.

Parameters:
dst The surface to drawn on.
chr The character to draw.
x The x coordinate where to draw the character.
y The y coordinate where to draw the character.
color The color of the character.

Implements Graphics::Font.

Definition at line 113 of file bdf.cpp.

int Graphics::BdfFont::getCharWidth ( uint32  chr  )  const [virtual]

Query the width of a specific character.

Parameters:
chr The character to query the width of.
Returns:
The character's width.

Implements Graphics::Font.

Definition at line 69 of file bdf.cpp.

const char * Graphics::BdfFont::getFamilyName (  )  const

Definition at line 49 of file bdf.cpp.

int Graphics::BdfFont::getFontHeight (  )  const [virtual]

Query the height of the font.

Returns:
font height.

Implements Graphics::Font.

Definition at line 57 of file bdf.cpp.

int Graphics::BdfFont::getFontSize (  )  const

Definition at line 61 of file bdf.cpp.

const char * Graphics::BdfFont::getFontSlant (  )  const

Definition at line 53 of file bdf.cpp.

int Graphics::BdfFont::getMaxCharWidth (  )  const [virtual]

Query the maximum width of the font.

Returns:
maximum font width.

Implements Graphics::Font.

Definition at line 65 of file bdf.cpp.

BdfFont * Graphics::BdfFont::loadFont ( Common::SeekableReadStream stream  )  [static]

Definition at line 287 of file bdf.cpp.

BdfFont * Graphics::BdfFont::loadFromCache ( Common::SeekableReadStream stream  )  [static]

Definition at line 624 of file bdf.cpp.

int Graphics::BdfFont::mapToIndex ( uint32  ch  )  const [private]

Definition at line 103 of file bdf.cpp.

BdfFont * Graphics::BdfFont::scaleFont ( BdfFont src,
int  newSize 
) [static]

Definition at line 703 of file bdf.cpp.


Member Data Documentation

Definition at line 83 of file bdf.h.

Definition at line 84 of file bdf.h.


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


Generated on Sat Jan 12 2019 05:04:19 for ResidualVM by doxygen 1.7.1
curved edge   curved edge