Panda3D
|
A representation of a single glyph (character) from a font. More...
#include <pandadoc.hpp>
Public Member Functions | |
float | getAdvance () |
Returns the distance by which the character pointer should be advanced after placing this character; i.e. | |
int | getCharacter () |
Returns the Unicode value that corresponds to the character this glyph represents. | |
Geom | getGeom (GeomEnums::UsageHint usage_hint) |
Returns a Geom that renders the particular glyph. | |
bool | getQuad (LVecBase4 dimensions, LVecBase4 texcoords) |
Assuming that this glyph is representable as a textured quad, returns its dimensions and UV range. | |
const RenderState | getState () |
Returns the state in which the glyph should be rendered. | |
bool | hasQuad () |
Returns true if this glyph contains the definition for a simple quad, rather than a more complex piece of geometry. | |
bool | isWhitespace () |
Returns true if this glyph represents invisible whitespace, or false if it corresponds to some visible character. | |
![]() | |
TypeHandle | getType () |
int | getTypeIndex () |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | isExactType (TypeHandle handle) |
Returns true if the current object is the indicated type exactly. | |
bool | isOfType (TypeHandle handle) |
Returns true if the current object is or derives from the indicated type. | |
![]() | |
int | getRefCount () |
Returns the current reference count. | |
ref () | |
Explicitly increments the reference count. | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
bool | unref () |
Explicitly decrements the reference count. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
Public Attributes | |
float | advance |
Returns the distance by which the character pointer should be advanced after placing this character; i.e. | |
int | character |
Returns the Unicode value that corresponds to the character this glyph represents. | |
const RenderState | state |
Returns the state in which the glyph should be rendered. | |
![]() | |
TypeHandle | type |
Returns the TypeHandle representing this object's type. | |
![]() | |
int | ref_count |
The current reference count. | |
A representation of a single glyph (character) from a font.
This is a piece of renderable geometry of some kind.
float getAdvance | ( | ) |
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.
int getCharacter | ( | ) |
Returns the Unicode value that corresponds to the character this glyph represents.
|
static |
Geom getGeom | ( | GeomEnums::UsageHint | usage_hint | ) |
Assuming that this glyph is representable as a textured quad, returns its dimensions and UV range.
Returns false if it is not representable as a quad, or if it is whitespace.
The order of the components is left, bottom, right, top.
const RenderState getState | ( | ) |
Returns the state in which the glyph should be rendered.
bool hasQuad | ( | ) |
Returns true if this glyph contains the definition for a simple quad, rather than a more complex piece of geometry.
You may still call get_geom() even if this returns true, which will synthesize a Geom for this quad.
bool isWhitespace | ( | ) |
Returns true if this glyph represents invisible whitespace, or false if it corresponds to some visible character.
float advance |
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.
int character |
Returns the Unicode value that corresponds to the character this glyph represents.
const RenderState state |
Returns the state in which the glyph should be rendered.