A GlyphSequence represents a sequence of glyph codes with positions. A GlyphSequence 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. A GlyphSequence maintains a hierarchy so that Painter can quickly cull glyphs that are not visible. The methods of GlyphSequence are re-entrant but not thread safe, i.e. if an application uses the same GlyphSequence from multiple threads it needs to explicitely handle locking itself when using it.
More...
#include <glyph_sequence.hpp>
|
| GlyphSequence (float format_size, enum PainterEnums::screen_orientation orientation, GlyphCache &cache, enum PainterEnums::glyph_layout_type layout=PainterEnums::glyph_layout_horizontal) |
|
| GlyphSequence (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 GlyphSource > glyph_sources, 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 |
|
unsigned int | number_subsets (void) const |
|
unsigned int | select_subsets (ScratchSpace &scratch_space, c_array< const vec3 > clip_equations, const float3x3 &clip_matrix_local, c_array< unsigned int > dst) const |
|
Subset | subset (unsigned int I) const |
|
A GlyphSequence represents a sequence of glyph codes with positions. A GlyphSequence 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. A GlyphSequence maintains a hierarchy so that Painter can quickly cull glyphs that are not visible. The methods of GlyphSequence are re-entrant but not thread safe, i.e. if an application uses the same GlyphSequence from multiple threads it needs to explicitely handle locking itself when using it.
Definition at line 51 of file glyph_sequence.hpp.
◆ GlyphSequence() [1/2]
◆ GlyphSequence() [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::GlyphSequence::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 176 of file glyph_sequence.hpp.
◆ add_glyphs()
Add GlyphSource values and positions; values are -copied-.
- Parameters
-
glyph_sources | specifies what glyphs to add |
positions | specifies the positions of each glyph added |
◆ added_glyph()
void fastuidraw::GlyphSequence::added_glyph |
( |
unsigned int |
I, |
|
|
GlyphMetrics * |
out_glyph_metrics, |
|
|
vec2 * |
out_position |
|
) |
| const |
Returns the GlyphMetrics 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::GlyphSequence::format_size |
( |
void |
| ) |
const |
◆ glyph_cache()
GlyphCache& fastuidraw::GlyphSequence::glyph_cache |
( |
void |
| ) |
const |
◆ number_glyphs()
unsigned int fastuidraw::GlyphSequence::number_glyphs |
( |
void |
| ) |
const |
◆ number_subsets()
unsigned int fastuidraw::GlyphSequence::number_subsets |
( |
void |
| ) |
const |
◆ select_subsets()
unsigned int fastuidraw::GlyphSequence::select_subsets |
( |
ScratchSpace & |
scratch_space, |
|
|
c_array< const vec3 > |
clip_equations, |
|
|
const float3x3 & |
clip_matrix_local, |
|
|
c_array< unsigned int > |
dst |
|
) |
| const |
Fetch those Subset objects that intersect a region specified by clip equations.
- Parameters
-
| scratch_space | scratch space for computations. |
| clip_equations | array of clip equations |
| clip_matrix_local | 3x3 transformation from local (x, y, 1) coordinates to clip coordinates. |
[out] | dst | location to which to write the Subset ID values |
- Returns
- the number of Subset object ID's written to dst, that number is guaranteed to be no more than number_subsets().
◆ subset()
Subset fastuidraw::GlyphSequence::subset |
( |
unsigned int |
I | ) |
const |
The documentation for this class was generated from the following file:
- /home/kevin/fastuidraw.krogueintel/inc/fastuidraw/painter/attribute_data/glyph_sequence.hpp