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

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 std::string &fontfile, int size=14, int index=0)
 Construct a PG_Font object.
 PG_Font (const PG_Font &font)
PG_Fontoperator= (const PG_Font &font)
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.
void SetHighlightColor (const PG_Color &c)
PG_Color GetColor ()
 Get the current color of the font.
PG_Color GetHighlightColor ()
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 std::string &fontfile)
 Set the name (filename) of the font.
const std::string & GetName ()
 Get the current name of the font (filename).
void SetIndex (int index)
int GetIndex ()


Member Enumeration Documentation

enum PG_Font::Style
 

Font styles.

Enumeration values:
NORMAL 
BOLD 
ITALIC 
UNDERLINE 


Constructor & Destructor Documentation

PG_Font::PG_Font const std::string &  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

PG_Font::PG_Font const PG_Font font  ) 
 

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

PG_Color PG_Font::GetHighlightColor  ) 
 

int PG_Font::GetIndex  ) 
 

const std::string& 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  ) 
 

PG_Font& PG_Font::operator= const PG_Font font  ) 
 

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::SetHighlightColor const PG_Color c  ) 
 

void PG_Font::SetIndex int  index  ) 
 

bool PG_Font::SetName const std::string &  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  ) 
 


Generated on Tue Jun 24 02:25:39 2008 for ParaGUI by  doxygen 1.4.2