font_impl Class Reference

Inheritance diagram for font_impl:

Inheritance graph
[legend]
Collaboration diagram for font_impl:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 116 of file font.cpp.


Public Member Functions

void attach ()
float calc_height (const string &)
float calc_width (const string &)
bool detach ()
 Returns true if the object deleted itself.
void draw (const string &)
 font_impl (const string &, int size, const color &fg)
const stringget_face () const
const colorget_fg () const
const int & get_ref_count () const
const int get_size () const
virtual ~font_impl ()

Private Member Functions

void get_font_dir ()
textureget_glyph (const wchar_t)

Private Attributes

const string face
color fg
TTF_Font * font
int font_ascent
int font_height
dictionary< float, wchar_t > glyph_pct_x
dictionary< float, wchar_t > glyph_pct_y
dictionary< texture *, wchar_t > glyph_textures
dictionary< float, wchar_t > glyph_widths
const int size
int texture_height

Constructor & Destructor Documentation

font_impl ( const string face,
int  size,
const color fg 
)

~font_impl (  )  [virtual]

Definition at line 198 of file font.cpp.

References font_impl::glyph_textures.


Member Function Documentation

void attach (  )  [inherited]

float calc_height ( const string str  ) 

Definition at line 209 of file font.cpp.

References string::c_string().

Referenced by font::calc_height().

float calc_width ( const string str  ) 

Definition at line 220 of file font.cpp.

References string::c_string().

Referenced by font::calc_width().

bool detach (  )  [inherited]

Returns true if the object deleted itself.

Definition at line 59 of file shared.cpp.

References shared_object::ref_count.

Referenced by string::make_null(), string::unshare(), font::~font(), and texture::~texture().

void draw ( const string str  ) 

const string& get_face (  )  const [inline]

Definition at line 136 of file font.cpp.

References font_impl::face.

Referenced by font::get_face().

const color& get_fg (  )  const [inline]

Definition at line 138 of file font.cpp.

References font_impl::fg.

void get_font_dir (  )  [private]

Definition at line 335 of file font.cpp.

References directory::get_full_path(), and directory::SEPARATOR.

Referenced by font_impl::font_impl().

texture * get_glyph ( const   wchar_t  )  [private]

const int& get_ref_count (  )  const [inline, inherited]

Definition at line 57 of file shared.hpp.

Referenced by string::unshare().

const int get_size (  )  const [inline]

Definition at line 137 of file font.cpp.

References font_impl::size.

Referenced by font::get_size().


Member Data Documentation

const string face [private]

Definition at line 119 of file font.cpp.

Referenced by font_impl::get_face(), and font_impl::get_glyph().

color fg [private]

Definition at line 130 of file font.cpp.

Referenced by font_impl::get_fg(), and font_impl::get_glyph().

TTF_Font* font [private]

Definition at line 129 of file font.cpp.

int font_ascent [private]

Definition at line 123 of file font.cpp.

Referenced by font_impl::font_impl(), and font_impl::get_glyph().

int font_height [private]

Definition at line 122 of file font.cpp.

Referenced by font_impl::draw(), font_impl::font_impl(), and font_impl::get_glyph().

dictionary<float, wchar_t> glyph_pct_x [private]

Definition at line 126 of file font.cpp.

Referenced by font_impl::draw(), and font_impl::get_glyph().

dictionary<float, wchar_t> glyph_pct_y [private]

Definition at line 126 of file font.cpp.

Referenced by font_impl::draw(), and font_impl::get_glyph().

dictionary<texture *, wchar_t> glyph_textures [private]

Definition at line 131 of file font.cpp.

Referenced by font_impl::get_glyph(), and font_impl::~font_impl().

dictionary<float, wchar_t> glyph_widths [private]

Definition at line 127 of file font.cpp.

Referenced by font_impl::draw(), and font_impl::get_glyph().

const int size [private]

Definition at line 120 of file font.cpp.

Referenced by font_impl::get_glyph(), and font_impl::get_size().

int texture_height [private]

Definition at line 124 of file font.cpp.

Referenced by font_impl::font_impl(), and font_impl::get_glyph().


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

Generated on Sat Mar 1 13:50:07 2008 for Periapsis Project by  doxygen 1.5.5