Panda3D
|
A representation of a single glyph (character) from a font. More...
#include "textGlyph.h"
Public Member Functions | |
TextGlyph (int character) | |
This constructor makes an invalid glyph. | |
TextGlyph (int character, const Geom *geom, const RenderState *state, PN_stdfloat advance) | |
TextGlyph (const TextGlyph ©) | |
PN_stdfloat | get_advance () const |
Returns the distance by which the character pointer should be advanced after placing this character; i.e. | |
int | get_character () const |
Returns the Unicode value that corresponds to the character this glyph represents. | |
virtual bool | is_whitespace () const |
Returns true if this glyph represents invisible whitespace, or false if it corresponds to some visible character. | |
void | operator= (const TextGlyph ©) |
Protected Member Functions | |
CPT (Geom) _geom | |
CPT (RenderState) _state | |
Protected Attributes | |
PN_stdfloat | _advance |
int | _character |
A representation of a single glyph (character) from a font.
This is a piece of renderable geometry of some kind.
Definition at line 31 of file textGlyph.h.
TextGlyph::TextGlyph | ( | int | character | ) | [inline] |
This constructor makes an invalid glyph.
Definition at line 22 of file textGlyph.I.
PN_stdfloat TextGlyph::get_advance | ( | ) | const [inline] |
Returns the distance by which the character pointer should be advanced after placing this character; i.e.
the approximate width the character takes up on the line.
Definition at line 130 of file textGlyph.I.
Referenced by TextAssembler::calc_width(), and StaticTextFont::StaticTextFont().
int TextGlyph::get_character | ( | ) | const [inline] |
Returns the Unicode value that corresponds to the character this glyph represents.
Definition at line 81 of file textGlyph.I.
bool TextGlyph::is_whitespace | ( | ) | const [virtual] |
Returns true if this glyph represents invisible whitespace, or false if it corresponds to some visible character.
Definition at line 34 of file textGlyph.cxx.
Referenced by TextAssembler::is_whitespace().