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 string & | get_face () const |
const color & | get_fg () const |
const int & | get_ref_count () const |
const int | get_size () const |
virtual | ~font_impl () |
Private Member Functions | |
void | get_font_dir () |
texture * | get_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 |
Definition at line 157 of file font.cpp.
References string::c_string(), font_impl::font_ascent, font_impl::font_height, font_impl::get_font_dir(), countable::is_empty(), font_impl::texture_height, and string::w_string().
~font_impl | ( | ) | [virtual] |
void attach | ( | ) | [inherited] |
Definition at line 53 of file shared.cpp.
References shared_object::ref_count.
Referenced by font::font(), material::material(), model_part::model_part(), string::operator=(), string::string(), texture::texture(), and string::unshare().
Definition at line 209 of file font.cpp.
References string::c_string().
Referenced by font::calc_height().
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 | ) |
Definition at line 231 of file font.cpp.
References texture::bind(), CHECK_GL_ERRORS, font_impl::font_height, font_impl::get_glyph(), font_impl::glyph_pct_x, font_impl::glyph_pct_y, font_impl::glyph_widths, and string::size().
Referenced by font::draw().
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] |
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] |
Definition at line 288 of file font.cpp.
References color::COMPONENT_BLUE, color::COMPONENT_GREEN, color::COMPONENT_RED, font_impl::face, font_impl::fg, font_impl::font_ascent, font_impl::font_height, string::format(), font_impl::glyph_pct_x, font_impl::glyph_pct_y, font_impl::glyph_textures, font_impl::glyph_widths, font_impl::size, gsgl::platform::TEXTURE_COLORMAP, gsgl::platform::TEXTURE_ENV_REPLACE, gsgl::platform::TEXTURE_FILTER_LINEAR, font_impl::texture_height, gsgl::platform::TEXTURE_WRAP_CLAMP, and string::w_string().
Referenced by font_impl::draw().
const int& get_ref_count | ( | ) | const [inline, inherited] |
const int get_size | ( | ) | const [inline] |
Definition at line 137 of file font.cpp.
References font_impl::size.
Referenced by font::get_size().
Definition at line 119 of file font.cpp.
Referenced by font_impl::get_face(), and font_impl::get_glyph().
Definition at line 130 of file font.cpp.
Referenced by font_impl::get_fg(), and font_impl::get_glyph().
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().