17 INLINE DynamicTextGlyph::
18 DynamicTextGlyph(
int character, DynamicTextPage *page,
int x,
int y,
19 int x_size,
int y_size,
int margin, PN_stdfloat advance) :
23 _x_size(x_size), _y_size(y_size),
32 INLINE DynamicTextGlyph::
33 DynamicTextGlyph(
int character, PN_stdfloat advance) :
37 _x_size(0), _y_size(0),
45 INLINE DynamicTextPage *DynamicTextGlyph::
55 INLINE
bool DynamicTextGlyph::
56 intersects(
int x,
int y,
int x_size,
int y_size)
const {
57 int hright = x + x_size;
58 int hbot = y + y_size;
60 int mright = _x + _x_size;
61 int mbot = _y + _y_size;
63 return !(x >= mright || hright <= _x ||
64 y >= mbot || hbot <= _y);
71 INLINE PN_stdfloat DynamicTextGlyph::
73 return _quad_dimensions[0];
80 INLINE PN_stdfloat DynamicTextGlyph::
82 return _quad_dimensions[1];
89 INLINE PN_stdfloat DynamicTextGlyph::
91 return _quad_dimensions[2];
98 INLINE PN_stdfloat DynamicTextGlyph::
100 return _quad_dimensions[3];
107 INLINE PN_stdfloat DynamicTextGlyph::
108 get_uv_left()
const {
109 return _quad_texcoords[0];
116 INLINE PN_stdfloat DynamicTextGlyph::
117 get_uv_bottom()
const {
118 return _quad_texcoords[1];
125 INLINE PN_stdfloat DynamicTextGlyph::
126 get_uv_right()
const {
127 return _quad_texcoords[2];
134 INLINE PN_stdfloat DynamicTextGlyph::
136 return _quad_texcoords[3];
A representation of a single glyph (character) from a font.