Crazy Eddies GUI System
0.6.0
|
internal class representing a single font glyph. More...
Public Member Functions | |
FontGlyph () | |
construct an empty uninitialized FontGlyph | |
FontGlyph (float advance) | |
FontGlyph constructor. | |
FontGlyph (float advance, const Image *image) | |
A better :-) FontGlyph constructor. | |
const Image * | getImage () const |
Return the CEGUI::Image object rendered for this glyph. | |
const Imageset * | getImageset () const |
Return the parent CEGUI::Imageset object for this glyph. | |
Size | getSize (float x_scale, float y_scale) const |
Return the scaled pixel size of the glyph. | |
float | getWidth (float x_scale) const |
Return the scaled widht of the glyph. | |
float | getHeight (float y_scale) const |
Return the scaled height of the glyph. | |
float | getRenderedAdvance (float x_scale) const |
Return the rendered advance value for this glyph. More... | |
float | getAdvance (float x_scale=1.0) const |
Return the horizontal advance value for the glyph. More... | |
void | setAdvance (float advance) |
Set the horizontal advance value for the glyph. | |
void | setImage (const Image *image) |
Set the CEGUI::Image object rendered for this glyph. | |
internal class representing a single font glyph.
For TrueType fonts initially all FontGlyph's are empty (getImage() will return NULL), but they are filled by demand.
|
inline |
Return the horizontal advance value for the glyph.
The returned value is the number of pixels the pen should move horizontally to position itself ready to render the next glyph. This is not always the same as the glyph image width or rendererd advance, since it allows for horizontal overhangs.
Referenced by CEGUI::Font::drawTextLine(), CEGUI::Font::drawTextLineJustified(), CEGUI::Font::getCharAtPixel(), and CEGUI::Font::getTextExtent().
|
inline |
Return the rendered advance value for this glyph.
The rendered advance value is the total number of pixels from the current pen position that will be occupied by this glyph when rendered.
References CEGUI::Image::getOffsetX(), and CEGUI::Image::getWidth().
Referenced by CEGUI::Font::getTextExtent().