14 #ifndef DYNAMICTEXTGLYPH_H 15 #define DYNAMICTEXTGLYPH_H 23 class DynamicTextPage;
24 class DynamicTextFont;
31 class EXPCL_PANDA_TEXT DynamicTextGlyph :
public TextGlyph {
33 INLINE DynamicTextGlyph(
int character, DynamicTextPage *page,
34 int x,
int y,
int x_size,
int y_size,
35 int margin, PN_stdfloat advance);
36 INLINE DynamicTextGlyph(
int character, PN_stdfloat advance);
37 DynamicTextGlyph(
const DynamicTextGlyph ©) =
delete;
39 DynamicTextGlyph &operator = (
const DynamicTextGlyph ©) =
delete;
42 virtual ~DynamicTextGlyph();
44 INLINE DynamicTextPage *get_page()
const;
45 MAKE_PROPERTY(page, get_page);
47 INLINE
bool intersects(
int x,
int y,
int x_size,
int y_size)
const;
49 INLINE PN_stdfloat get_left()
const;
50 INLINE PN_stdfloat get_bottom()
const;
51 INLINE PN_stdfloat get_right()
const;
52 INLINE PN_stdfloat get_top()
const;
54 INLINE PN_stdfloat get_uv_left()
const;
55 INLINE PN_stdfloat get_uv_bottom()
const;
56 INLINE PN_stdfloat get_uv_right()
const;
57 INLINE PN_stdfloat get_uv_top()
const;
60 unsigned char *get_row(
int y);
61 void erase(DynamicTextFont *font);
64 DynamicTextPage *_page;
70 friend class DynamicTextFont;
76 static void init_type() {
77 TextGlyph::init_type();
79 TextGlyph::get_class_type());
82 return get_class_type();
84 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
92 #endif // HAVE_FREETYPE PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool is_whitespace() const
Returns true if this glyph represents invisible whitespace, or false if it corresponds to some visibl...
A representation of a single glyph (character) from a font.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.