15 #ifndef DYNAMICTEXTGLYPH_H 16 #define DYNAMICTEXTGLYPH_H 18 #include "pandabase.h" 22 #include "textGlyph.h" 24 class DynamicTextPage;
25 class DynamicTextFont;
34 class EXPCL_PANDA_TEXT DynamicTextGlyph :
public TextGlyph {
36 INLINE DynamicTextGlyph(
int character, DynamicTextPage *page,
37 int x,
int y,
int x_size,
int y_size,
39 INLINE DynamicTextGlyph(
int character, PN_stdfloat advance);
41 INLINE DynamicTextGlyph(
const DynamicTextGlyph ©);
42 INLINE
void operator = (
const DynamicTextGlyph ©);
45 virtual ~DynamicTextGlyph();
47 INLINE DynamicTextPage *get_page()
const;
49 INLINE
bool intersects(
int x,
int y,
int x_size,
int y_size)
const;
51 INLINE PN_stdfloat get_top()
const;
52 INLINE PN_stdfloat get_left()
const;
53 INLINE PN_stdfloat get_bottom()
const;
54 INLINE PN_stdfloat get_right()
const;
56 INLINE PN_stdfloat get_uv_top()
const;
57 INLINE PN_stdfloat get_uv_left()
const;
58 INLINE PN_stdfloat get_uv_bottom()
const;
59 INLINE PN_stdfloat get_uv_right()
const;
62 unsigned char *get_row(
int y);
63 void erase(DynamicTextFont *font);
64 void make_geom(
int top,
int left, PN_stdfloat advance, PN_stdfloat poly_margin,
65 PN_stdfloat tex_x_size, PN_stdfloat tex_y_size,
66 PN_stdfloat font_pixels_per_unit, PN_stdfloat tex_pixels_per_unit);
71 DynamicTextPage *_page;
77 PN_stdfloat _top, _left, _bottom, _right;
78 PN_stdfloat _uv_top, _uv_left, _uv_bottom, _uv_right;
84 static void init_type() {
85 TextGlyph::init_type();
86 register_type(_type_handle,
"DynamicTextGlyph",
87 TextGlyph::get_class_type());
90 return get_class_type();
92 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
98 #include "dynamicTextGlyph.I" 100 #endif // HAVE_FREETYPE This is an abstract base class for a family of classes that represent the fundamental geometry primit...
virtual bool is_whitespace() const
Returns true if this glyph represents invisible whitespace, or false if it corresponds to some visibl...
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A representation of a single glyph (character) from a font.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
TypeHandle is the identifier used to differentiate C++ class types.