A GlyphAttributePacker provides an interface to customize how glyph attribute and index data is realized by a GlyphRun and GlyphSequence.
More...
#include <glyph_attribute_packer.hpp>
|
virtual void | compute_needed_room (GlyphRenderer glyph_renderer, c_array< const GlyphAttribute > glyph_attributes, unsigned int *out_num_indices, unsigned int *out_num_attributes) const =0 |
|
virtual void | glyph_position (Glyph glyph, const vec2 position, float scale_factor, vec2 *p_bl, vec2 *p_tr) const =0 |
|
virtual void | glyph_position_from_metrics (GlyphMetrics metrics, const vec2 position, float scale_factor, vec2 *p_bl, vec2 *p_tr) const =0 |
|
virtual void | realize_attribute_data (GlyphRenderer glyph_renderer, c_array< const GlyphAttribute > glyph_attributes, c_array< PainterIndex > dst_indices, c_array< PainterAttribute > dst_attribs, const vec2 p_bl, const vec2 p_tr) const =0 |
|
| reference_counted_base (void) |
|
A GlyphAttributePacker provides an interface to customize how glyph attribute and index data is realized by a GlyphRun and GlyphSequence.
Definition at line 36 of file glyph_attribute_packer.hpp.
◆ compute_needed_room()
virtual void fastuidraw::GlyphAttributePacker::compute_needed_room |
( |
GlyphRenderer |
glyph_renderer, |
|
|
c_array< const GlyphAttribute > |
glyph_attributes, |
|
|
unsigned int * |
out_num_indices, |
|
|
unsigned int * |
out_num_attributes |
|
) |
| const |
|
pure virtual |
To be implemented by a derived class to return how many indices and attributes are needed to realize a single glyph.
- Parameters
-
| glyph_renderer | Glyph::renderer() of Glyph to realize |
| glyph_attributes | Glyph::attributes() of Glyph to realize |
[out] | out_num_indices | number of indices needed to realize the glyph |
[out] | out_num_attributes | number of attributes needed to realize the glyph |
◆ glyph_position()
virtual void fastuidraw::GlyphAttributePacker::glyph_position |
( |
Glyph |
glyph, |
|
|
const vec2 |
position, |
|
|
float |
scale_factor, |
|
|
vec2 * |
p_bl, |
|
|
vec2 * |
p_tr |
|
) |
| const |
|
pure virtual |
To be implemented by a derived class to return the positions of the bottom-left and top-right coordinates of a glyph at the named position.
- Parameters
-
| glyph | Glyph to realize |
| position | position of bottom left of glyph |
| scale_factor | the amount by which to scale from the Glyph object's coordinates |
[out] | p_bl | location to which to write the bottom-left coordinate of the glyph |
[out] | p_tr | location to which to write the top-right coordinate of the glyph |
◆ glyph_position_from_metrics()
virtual void fastuidraw::GlyphAttributePacker::glyph_position_from_metrics |
( |
GlyphMetrics |
metrics, |
|
|
const vec2 |
position, |
|
|
float |
scale_factor, |
|
|
vec2 * |
p_bl, |
|
|
vec2 * |
p_tr |
|
) |
| const |
|
pure virtual |
To be implemented by a derived class to return the positions of the bottom-left and top-right coordinates of a glyph at the named position using only the information from GlyphMetrics.
- Parameters
-
| metrics | GlyphMertics to use to compute the bounding box |
| position | position of bottom left of glyph |
| scale_factor | the amount by which to scale from the Glyph object's coordinates |
[out] | p_bl | location to which to write the bottom-left coordinate of the glyph |
[out] | p_tr | location to which to write the top-right coordinate of the glyph |
◆ realize_attribute_data()
To be implemented by a derived class to provide the attributes and indices to realize a glyph.
- Parameters
-
◆ standard_packer()
The documentation for this class was generated from the following file: