Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

PG_Font Class Reference

List of all members.

Detailed Description

font description class

This class defines the parameters of a font (size, style, ...)


Public Types

enum  Style { NORMAL = 0x00, BOLD = 0x01, ITALIC = 0x02, UNDERLINE = 0x04 }
 Font styles. More...


Public Member Functions

 PG_Font (const char *fontfile, int size=14, int index=0)
 Construct a PG_Font object.

virtual ~PG_Font ()
int GetFontAscender ()
int GetFontDescender ()
int GetFontHeight ()
 Get the absolute height of the font (in pixels).

void SetColor (const PG_Color &c)
 Set the color of the font.

PG_Color GetColor ()
 Get the current color of the font.

void SetAlpha (int a)
 Set the transparency of the font.

int GetAlpha ()
 Get the transparency of the font.

void SetSize (int s)
 Set the size of the font.

int GetSize ()
 Get the size of the font.

void SetStyle (Style s)
Style GetStyle ()
bool SetName (const char *fontfile)
 Set the name (filename) of the font.

const char * GetName ()
 Get the current name of the font (filename).

void SetIndex (int index)
int GetIndex ()

Friends

class PG_FontEngine


Member Enumeration Documentation

enum PG_Font::Style
 

Font styles.

Enumeration values:
NORMAL 
BOLD 
ITALIC 
UNDERLINE 


Constructor & Destructor Documentation

PG_Font::PG_Font const char *  fontfile,
int  size = 14,
int  index = 0
 

Construct a PG_Font object.

Parameters:
fontfile name of the fontfile to load
size size of the new font
index font index of the loaded file

virtual PG_Font::~PG_Font  )  [virtual]
 


Member Function Documentation

int PG_Font::GetAlpha  ) 
 

Get the transparency of the font.

Returns:
font alpha value

PG_Color PG_Font::GetColor  ) 
 

Get the current color of the font.

Returns:
PG_Color class containing the current color

int PG_Font::GetFontAscender  ) 
 

int PG_Font::GetFontDescender  ) 
 

int PG_Font::GetFontHeight  ) 
 

Get the absolute height of the font (in pixels).

Returns:
height of the font

int PG_Font::GetIndex  ) 
 

const char* PG_Font::GetName  ) 
 

Get the current name of the font (filename).

Returns:
the filename of the font

int PG_Font::GetSize  ) 
 

Get the size of the font.

Returns:
current size of the font

Style PG_Font::GetStyle  ) 
 

void PG_Font::SetAlpha int  a  ) 
 

Set the transparency of the font.

Parameters:
a font alpha value

void PG_Font::SetColor const PG_Color c  ) 
 

Set the color of the font.

Parameters:
c PG_Color class of the new color

void PG_Font::SetIndex int  index  ) 
 

bool PG_Font::SetName const char *  fontfile  ) 
 

Set the name (filename) of the font.

Parameters:
fontfile name of the new fontfile.
Returns:
true - on success This function loads a new font from a file

void PG_Font::SetSize int  s  ) 
 

Set the size of the font.

Parameters:
s new font size

void PG_Font::SetStyle Style  s  ) 
 


Friends And Related Function Documentation

friend class PG_FontEngine [friend]
 



The ParaGUI Project - Alexander Pipelka