A GlyphRun represents a sequence of glyph codes with positions. A GlyphRun provides an interface to grab the glyph-codes realized as different renderers for the purpose of rendering text in response to the transformation that a Painter currently has. In contrast to a GlyphSequence, a GlyphRun does NOT maintain a hierarchy to perform culling. However, it does provide an interface to select continuous subsets of the glyphs for the purporse of rendering. In addition, since it does not carry a hierarchy for culling, it is also a lighter weight object than GlyphSequence. Like GlyphSequence, the methods of GlyphRun are re-entrant but not thread safe, i.e. if an application uses the same GlyphRun from multiple threads it needs to explicitely handle locking itself when using it.
More...
#include <glyph_run.hpp>
|
| GlyphRun (float format_size, enum PainterEnums::screen_orientation orientation, GlyphCache &cache, enum PainterEnums::glyph_layout_type layout=PainterEnums::glyph_layout_horizontal) |
|
| GlyphRun (float format_size, GlyphCache &cache, const reference_counted_ptr< const GlyphAttributePacker > &packer) |
|
void | add_glyph (const GlyphSource &glyph_source, const vec2 &position) |
|
void | add_glyphs (c_array< const GlyphMetrics > glyph_metrics, c_array< const vec2 > positions) |
|
void | add_glyphs (c_array< const GlyphSource > glyph_sources, c_array< const vec2 > positions) |
|
void | add_glyphs (const FontBase *font, c_array< const uint32_t > glyph_codes, c_array< const vec2 > positions) |
|
void | added_glyph (unsigned int I, GlyphMetrics *out_glyph_metrics, vec2 *out_position) const |
|
const GlyphAttributePacker & | attribute_packer (void) const |
|
float | format_size (void) const |
|
GlyphCache & | glyph_cache (void) const |
|
unsigned int | number_glyphs (void) const |
|
const PainterAttributeWriter & | subsequence (GlyphRenderer renderer, unsigned int begin, unsigned int count) const |
|
const PainterAttributeWriter & | subsequence (GlyphRenderer renderer, unsigned int begin) const |
|
const PainterAttributeWriter & | subsequence (GlyphRenderer renderer) const |
|
A GlyphRun represents a sequence of glyph codes with positions. A GlyphRun provides an interface to grab the glyph-codes realized as different renderers for the purpose of rendering text in response to the transformation that a Painter currently has. In contrast to a GlyphSequence, a GlyphRun does NOT maintain a hierarchy to perform culling. However, it does provide an interface to select continuous subsets of the glyphs for the purporse of rendering. In addition, since it does not carry a hierarchy for culling, it is also a lighter weight object than GlyphSequence. Like GlyphSequence, the methods of GlyphRun are re-entrant but not thread safe, i.e. if an application uses the same GlyphRun from multiple threads it needs to explicitely handle locking itself when using it.
Definition at line 54 of file glyph_run.hpp.
◆ GlyphRun() [1/2]
◆ GlyphRun() [2/2]
Ctor.
- Parameters
-
format_size | format size at which glyphs added via |
cache | GlyphCache used to fetch Glyph values |
packer | specifies how the Glyph values will be realized as attribute and index data. |
◆ add_glyph()
void fastuidraw::GlyphRun::add_glyph |
( |
const GlyphSource & |
glyph_source, |
|
|
const vec2 & |
position |
|
) |
| |
|
inline |
Add a single GlyphSource and position
- Parameters
-
glyph_source | specifies what glyph to add |
position | specifies the position of the glyph added |
Definition at line 125 of file glyph_run.hpp.
◆ add_glyphs() [1/3]
Add glyphs passing an array of positions and GlyphMetric values; values are -copied-.
- Parameters
-
glyph_metrics | specifies what glyphs to add |
positions | specifies the positions of each glyph added |
◆ add_glyphs() [2/3]
Add GlyphSource values and positions; values are -copied-.
- Parameters
-
glyph_sources | specifies what glyphs to add |
positions | specifies the positions of each glyph added |
◆ add_glyphs() [3/3]
void fastuidraw::GlyphRun::add_glyphs |
( |
const FontBase * |
font, |
|
|
c_array< const uint32_t > |
glyph_codes, |
|
|
c_array< const vec2 > |
positions |
|
) |
| |
Add glyphs from a specific font and positions; values are -copied-.
- Parameters
-
font | font from which to fetch glyphs |
glyph_codes | specifies what glyphs to add |
positions | specifies the positions of each glyph added |
◆ added_glyph()
void fastuidraw::GlyphRun::added_glyph |
( |
unsigned int |
I, |
|
|
GlyphMetrics * |
out_glyph_metrics, |
|
|
vec2 * |
out_position |
|
) |
| const |
Returns the GlyphSource and position value for the i'th glyph added via add_glyph() or add_glyphs().
- Parameters
-
I | index to select which glyph, must be that 0 <= I < number_glyphs() |
*out_glyph_metrics | location to which to write the GlyphMetrics value describing the glyph |
*out_position | location to which to write the position of the glyph |
◆ attribute_packer()
◆ format_size()
float fastuidraw::GlyphRun::format_size |
( |
void |
| ) |
const |
◆ glyph_cache()
GlyphCache& fastuidraw::GlyphRun::glyph_cache |
( |
void |
| ) |
const |
◆ number_glyphs()
unsigned int fastuidraw::GlyphRun::number_glyphs |
( |
void |
| ) |
const |
◆ subsequence() [1/3]
◆ subsequence() [2/3]
◆ subsequence() [3/3]
The documentation for this class was generated from the following file:
- /home/kevin/fastuidraw.krogueintel/inc/fastuidraw/painter/attribute_data/glyph_run.hpp