Panda3D
Public Member Functions | Protected Member Functions | Protected Attributes

TextGlyph Class Reference

A representation of a single glyph (character) from a font. More...

#include "textGlyph.h"

Inheritance diagram for TextGlyph:
ReferenceCount MemoryBase

List of all members.

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 &copy)
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 &copy)

Protected Member Functions

 CPT (Geom) _geom
 CPT (RenderState) _state

Protected Attributes

PN_stdfloat _advance
int _character

Detailed Description

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.


Constructor & Destructor Documentation

TextGlyph::TextGlyph ( int  character) [inline]

This constructor makes an invalid glyph.

Definition at line 22 of file textGlyph.I.


Member Function Documentation

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().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations