#include <TTFont.h>
Inheritance diagram for TTFont:

Public Member Functions | |
| TTFont (TTF_Font *font, uint32 rgb, int bordersize, bool antiAliased, bool SJIS) | |
| virtual | ~TTFont () |
| virtual int | getHeight () |
| virtual int | getBaseline () |
| virtual int | getBaselineSkip () |
| bool | isAntialiased () |
| virtual void | getStringSize (const std::string &text, int &width, int &height) |
| virtual void | getTextSize (const std::string &text, int &resultwidth, int &resultheight, unsigned int &remaining, int width=0, int height=0, TextAlign align=TEXT_LEFT, bool u8specials=false) |
| virtual RenderedText * | renderText (const std::string &text, unsigned int &remaining, int width=0, int height=0, TextAlign align=TEXT_LEFT, bool u8specials=false, std::string::size_type cursor=std::string::npos) |
| ENABLE_RUNTIME_CLASSTYPE () | |
Protected Attributes | |
| TTF_Font * | ttf_font |
| uint32 | rgb |
| int | bordersize |
| bool | antiAliased |
| bool | SJIS |
| uint16 | bullet |
Definition at line 27 of file TTFont.h.
| TTFont::~TTFont | ( | ) | [virtual] |
Definition at line 68 of file TTFont.cpp.
| TTFont::ENABLE_RUNTIME_CLASSTYPE | ( | ) |
Reimplemented from Pentagram::Font.
| int TTFont::getBaseline | ( | ) | [virtual] |
get the baseline of the font (relative from the top)
Implements Pentagram::Font.
Definition at line 78 of file TTFont.cpp.
References ttf_font.
Referenced by TTFRenderedText::draw(), and TTFRenderedText::drawBlended().
| int TTFont::getBaselineSkip | ( | ) | [virtual] |
get the baselineskip of the font (distance between two baselines)
Implements Pentagram::Font.
Definition at line 83 of file TTFont.cpp.
References ttf_font.
| int TTFont::getHeight | ( | ) | [virtual] |
get the height of the font
Implements Pentagram::Font.
Definition at line 73 of file TTFont.cpp.
References bordersize, and ttf_font.
| void TTFont::getStringSize | ( | const std::string & | text, | |
| int & | width, | |||
| int & | height | |||
| ) | [virtual] |
get the dimensions of a string (not containing any newlines)
| text | The string | |
| width | Returns the width | |
| height | Returns the height |
Implements Pentagram::Font.
Definition at line 111 of file TTFont.cpp.
References bordersize, bullet, pout, SJIS, and ttf_font.
| void TTFont::getTextSize | ( | const std::string & | text, | |
| int & | resultwidth, | |||
| int & | resultheight, | |||
| unsigned int & | remaining, | |||
| int | width = 0, |
|||
| int | height = 0, |
|||
| TextAlign | align = TEXT_LEFT, |
|||
| bool | u8specials = false | |||
| ) | [virtual] |
| bool TTFont::isAntialiased | ( | ) | [inline] |
Definition at line 38 of file TTFont.h.
Referenced by TTFRenderedText::draw(), and TTFRenderedText::drawBlended().
| RenderedText * TTFont::renderText | ( | const std::string & | text, | |
| unsigned int & | remaining, | |||
| int | width = 0, |
|||
| int | height = 0, |
|||
| TextAlign | align = TEXT_LEFT, |
|||
| bool | u8specials = false, |
|||
| std::string::size_type | cursor = std::string::npos | |||
| ) | [virtual] |
Definition at line 152 of file TTFont.cpp.
References antiAliased, bordersize, Texture::buffer, bullet, Texture::height, if(), pal, pout, rgb, SJIS, ttf_font, Texture::width, x, and y.
bool TTFont::antiAliased [protected] |
int TTFont::bordersize [protected] |
Definition at line 61 of file TTFont.h.
Referenced by getHeight(), getStringSize(), renderText(), and TTFont().
uint16 TTFont::bullet [protected] |
uint32 TTFont::rgb [protected] |
bool TTFont::SJIS [protected] |
Definition at line 63 of file TTFont.h.
Referenced by getStringSize(), getTextSize(), and renderText().
TTF_Font* TTFont::ttf_font [protected] |
Definition at line 59 of file TTFont.h.
Referenced by getBaseline(), getBaselineSkip(), getHeight(), getStringSize(), and renderText().
1.4.7