17INLINE DynamicTextGlyph::
18DynamicTextGlyph(
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),
32INLINE DynamicTextGlyph::
33DynamicTextGlyph(
int character, PN_stdfloat advance) :
37 _x_size(0), _y_size(0),
45INLINE DynamicTextPage *DynamicTextGlyph::
55INLINE
bool DynamicTextGlyph::
56intersects(
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);
71INLINE PN_stdfloat DynamicTextGlyph::
73 return _quad_dimensions[0];
80INLINE PN_stdfloat DynamicTextGlyph::
82 return _quad_dimensions[1];
89INLINE PN_stdfloat DynamicTextGlyph::
91 return _quad_dimensions[2];
98INLINE PN_stdfloat DynamicTextGlyph::
100 return _quad_dimensions[3];
107INLINE PN_stdfloat DynamicTextGlyph::
109 return _quad_texcoords[0];
116INLINE PN_stdfloat DynamicTextGlyph::
117get_uv_bottom()
const {
118 return _quad_texcoords[1];
125INLINE PN_stdfloat DynamicTextGlyph::
126get_uv_right()
const {
127 return _quad_texcoords[2];
134INLINE PN_stdfloat DynamicTextGlyph::
136 return _quad_texcoords[3];
A representation of a single glyph (character) from a font.