#include <gfx_font_opengl.hh>

Public Member Functions | |
| Font (const FontDesc &desc, SafePtr< Gui > gui) | |
| ~Font () | |
| void | SetZoom (fp z) |
| void | Print (const string &text, fp x, fp y, eFontMode mode) |
| Print(): Print a text string in the window using a bitmapped font. | |
| void | Print (const string &text, fp x, fp y, eFontMode mode, const RGBA rgba) |
| void | Print (const char *text, uint textLen, fp x, fp y, eFontMode mode) |
| void | Print (const char *text, uint textLen, fp x, fp y, eFontMode mode, const RGBA rgba) |
| void | PrintBuildArgs (PrintArgs &args, const char *text, uint textLen, fp x, fp y, eFontMode fontMode) |
| void | Print (PrintArgs &args, bool draw=true) |
Private Types | |
| enum | eFontPad { eFontPad_DEFAULT = 4 } |
| typedef FontBase | Parent |
Private Member Functions | |
| void | PostProcess (Targa &targa) |
| bool | IsPixel (const Targa &targa, int x, int y) |
| void | ExtractLetters (const Targa &targa) |
| void | SetPadding (int padding) |
Private Attributes | |
| SafePtr< Gui > | mGui |
| int | mPadding |
| padding (in pixels) | |
| int | mHeight |
| fixed line height in the texture (should be maximum letter height) | |
| char | mStart |
| starting character | |
| fp | mZoom |
| zoom factor for output | |
| int | mLetters |
| number of letters | |
| vector< short > | mLetterx |
| starting x coordinate in the texture | |
| vector< short > | mLettery |
| starting y coordinate in the texture | |
| vector< short > | mLetterw |
| width in the texture | |
| shptr< Texture > | mTexture |
| font's texture | |
Friends | |
| class | GuiButton |
Classes | |
| class | PrintArgs |
See description at gfx_font.hh.
typedef FontBase gfx::Font::Parent [private] |
enum gfx::Font::eFontPad [private] |
| gfx::Font::~Font | ( | ) |
| void gfx::Font::SetZoom | ( | fp | z | ) | [virtual] |
Set font zoom (size).
Implements gfx::FontBase.
Print(): Print a text string in the window using a bitmapped font.
| text | String should NOT contain newlines nor tabs (unlike GL-117). | |
| x,y | Font cell coords (sort of like VGA text mode). For corner-justification, absolute values of coords are used. | |
| mode | Bitmask for justification (relative to a window corner). | |
| rgba | (optional) /// For example: /// Print( 0, 0, FONT_CENTER, "HI" ); /// Print( 2, 1, FONT_SE, "HELLO ); /// Print( 0, 0, FONT_NW, "BYE" ); /// /// +-------------------+ /// |BYE | /// | | /// | | /// | | /// | | /// | HI | /// | | /// | | /// | | /// | HELLO | (2,1) /// | | /// +-------------------+ /// |
Implements gfx::FontBase.
| void gfx::Font::Print | ( | const string & | text, | |
| fp | x, | |||
| fp | y, | |||
| eFontMode | mode, | |||
| const RGBA | rgba | |||
| ) | [virtual] |
This function is described at gfx_font.hh.
Implements gfx::FontBase.
Implements gfx::FontBase.
| void gfx::Font::Print | ( | const char * | text, | |
| uint | textLen, | |||
| fp | x, | |||
| fp | y, | |||
| eFontMode | mode, | |||
| const RGBA | rgba | |||
| ) | [virtual] |
Implements gfx::FontBase.
| void gfx::Font::Print | ( | PrintArgs & | args, | |
| bool | draw = true | |||
| ) |
| void gfx::Font::PostProcess | ( | Targa & | targa | ) | [private] |
Post-process font image (vestige from GL-117).
| bool gfx::Font::IsPixel | ( | const Targa & | targa, | |
| int | x, | |||
| int | y | |||
| ) | [private] |
T. Drexl: Each font is stored in one bitmap, width=height=2^n! Use GIMP or equiv and put the ASCII letters of your favourite font there, ascending order, start whereever you want. Write as many letters as possible per line, each separated by at least one whitespace. Look at the font*.tga files for examples. The max letter height is fixed.
| void gfx::Font::ExtractLetters | ( | const Targa & | targa | ) | [private] |
Extract letters.
| void gfx::Font::SetPadding | ( | int | padding | ) | [inline, private] |
friend class GuiButton [friend] |
SafePtr<Gui> gfx::Font::mGui [private] |
int gfx::Font::mPadding [private] |
padding (in pixels)
int gfx::Font::mHeight [private] |
fixed line height in the texture (should be maximum letter height)
char gfx::Font::mStart [private] |
starting character
fp gfx::Font::mZoom [private] |
zoom factor for output
int gfx::Font::mLetters [private] |
number of letters
vector<short> gfx::Font::mLetterx [private] |
starting x coordinate in the texture
vector<short> gfx::Font::mLettery [private] |
starting y coordinate in the texture
vector<short> gfx::Font::mLetterw [private] |
width in the texture
shptr<Texture> gfx::Font::mTexture [private] |
font's texture
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:26 2007