Classes | Public Types | Public Member Functions

a5::Font Class Reference
[Text]

Stores a font. More...

#include <Text.hpp>

List of all members.

Classes

class  Load_Failed
 Thrown when a font fails to load. More...

Public Types

enum  Flags
 

Font loading flags.

More...
enum  Align {
  Left = ALLEGRO_ALIGN_LEFT,
  Center = ALLEGRO_ALIGN_CENTRE,
  Right = ALLEGRO_ALIGN_RIGHT
}
 

Text alignment.

More...

Public Member Functions

 Font (const char *filename, int size=0, int flags=0)
 Loads a font from a file in to a Font object.
 Font (Bitmap &bitmap, int ranges_n, int ranges[])
 Loads a bitmap font.
 Font (ALLEGRO_FONT *font_, bool autofree=false)
 Wraps an existing ALLEGRO_FONT in a Font object.
ALLEGRO_FONT * Release ()
 Releases the held C structure so it is no longer automatically freed.
 ~Font ()
 Destroys the font.
 operator ALLEGRO_FONT * () const
 Returns a pointer to the Allegro font structure.

Detailed Description

Stores a font.


Member Enumeration Documentation

Font loading flags.

Text alignment.


Constructor & Destructor Documentation

a5::Font::Font ( const char *  filename,
int  size = 0,
int  flags = 0 
)

Loads a font from a file in to a Font object.

Exceptions:
Font::Load_Failed 
a5::Font::Font ( Bitmap bitmap,
int  ranges_n,
int  ranges[] 
)

Loads a bitmap font.

a5::Font::Font ( ALLEGRO_FONT *  font_,
bool  autofree = false 
)

Wraps an existing ALLEGRO_FONT in a Font object.

a5::Font::~Font (  ) 

Destroys the font.


Member Function Documentation

ALLEGRO_FONT* a5::Font::Release (  ) 

Releases the held C structure so it is no longer automatically freed.

a5::Font::operator ALLEGRO_FONT * (  )  const

Returns a pointer to the Allegro font structure.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines