|
Inherits Font.
Inherited by TexFontImpl.
List of all members.
Detailed Description
A texture font uses bitmaps of each character, collected onto one large texture, to render text.
Member Function Documentation
| virtual int TextureFont::countGlyphs |
( |
|
) |
const [pure virtual] |
|
|
|
Retrieve the number of glyphs in the font. |
| virtual TextVisual* TextureFont::createVisual |
( |
|
) |
[pure virtual] |
|
|
|
Create a new text visual, used to render a text string with this font. |
| virtual void TextureFont::getGlyphCodes |
( |
int * |
codes |
) |
[pure virtual] |
|
|
|
Get a list of the glyph codes used in the font. |
| virtual bool TextureFont::getGlyphInfo |
( |
int |
code, |
|
|
int * |
glyph |
|
) |
[pure virtual] |
|
|
|
Get information about a particular glyph. glyph should be an array of at least seven integers, which will be filled in the following order:
- [0] x position of the glyph on the texture
- [1] y position of the glyph on the texture
- [2] width of the glyph in texels
- [3] height of the glyph in texels
- [4] amount to advance horizontally before drawing next glyph
- [5] horizontal offset from the current drawing position
- [6] vertical offset from the current drawing position
-
Returns:
-
True if successful, false if code does not exist in the font.
|
| virtual int TextureFont::getHeight |
( |
|
) |
const [pure virtual] |
|
|
|
Retrieve the line height. |
| virtual Texture* TextureFont::getTexture |
( |
|
) |
[pure virtual] |
|
|
|
Retrieve the font texture. |
| virtual bool TextureFont::initialize |
( |
int |
height, |
|
|
Texture * |
texture |
|
) |
[pure virtual] |
|
|
|
Set the base values for the font. |
| virtual void TextureFont::setGlyph |
( |
int |
code, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
advance, |
|
|
int |
left, |
|
|
int |
bottom |
|
) |
[pure virtual] |
|
|
|
Set up a glyph description. -
Parameters:
-
| code |
The character code of the glyph, ASCII or whatever. |
| x,y |
The position of the top left corner of the glyph on the texture. |
| w,h |
The size of the glyph on the texture. |
| advance |
How far to move horizontally before drawing the next glyph. |
| left,bottom |
The lower left corner of the glyph within it's own bounding box (offset from x, y). |
|
The documentation for this struct was generated from the following file:
Flat Four Engine
Copyright (C) 2001 by 379, Inc.
|
This page generated by Doxygen
|
|