A Glyph is essentially an opaque pointer to data for rendering and performing layout of a glyph.
More...
#include <glyph.hpp>
A Glyph is essentially an opaque pointer to data for rendering and performing layout of a glyph.
Definition at line 48 of file glyph.hpp.
◆ Glyph()
fastuidraw::Glyph::Glyph |
( |
void |
| ) |
|
|
inline |
Ctor. Initializes the Glyph to be invalid, i.e. essentially a nullptr pointer
Definition at line 55 of file glyph.hpp.
◆ attributes()
Returns the glyph's per-corner attribute data.
◆ cache()
GlyphCache* fastuidraw::Glyph::cache |
( |
void |
| ) |
const |
Returns the GlyphCache on which the glyph resides. The return value of valid() must be true. If not, debug builds FASTUIDRAWassert and release builds crash.
◆ cache_location()
unsigned int fastuidraw::Glyph::cache_location |
( |
void |
| ) |
const |
Returns the index location into the GlyphCache of the glyph. The return value of valid() must be true. If not, debug builds FASTUIDRAWassert and release builds crash.
◆ create_glyph()
◆ delete_glyph()
Destroy a Glyph that is NOT in a GlyphCache, i.e. cache() returns a nullptr. On success the underlying data of the passed Glyph is no longer valid and the Glyph value passed should be discarded (i.e. like a freed pointer).
- Parameters
-
◆ glyph_attribute_dst_write()
static void fastuidraw::Glyph::glyph_attribute_dst_write |
( |
int |
glyph_attribute_index, |
|
|
PainterAttribute::pointer_to_field * |
out_attribute, |
|
|
int * |
out_index_into_attribute |
|
) |
| |
|
static |
Given an index into an array of GlyphAttribute values, as used by pack_raw() or returned by attributes()), return the point to member variable of which attribute is written to from the glyph attribute value and what component of it.
- Parameters
-
glyph_attribute_index | into an array of GlyphAttribute values, for example the array returned by attributes(). |
out_attribute | location to which to write the pointer member of Painter Attribute that the glyph attribute value is written to in pack_raw() and/or pack_glyph(). |
out_index_into_attribute | location to which to write the array-index element of the member of Painter Attribute that the glyph attribute value is written to in pack_raw() and/or pack_glyph(). |
◆ metrics()
Returns the glyph's layout data, valid() must return true. If not, debug builds FASTUIDRAWassert and release builds crash.
◆ path()
const Path& fastuidraw::Glyph::path |
( |
void |
| ) |
const |
Returns the path of the Glyph; the path is in coordinates of the glyph with the convention that the y-coordinate increases upwards. If one is rendering the path (for example stroking it), together with drawing of glyphs via a Painter, then one needs to reverse the y-coordinate (for example by Painter::shear(1.0, -1.0)) if the glyphs are rendered with data packed by pack_glyph() with PainterEnums::y_increases_downwards.
◆ render_cost()
Provides information on the rendering cost of the Glyph, entirely dependent on the GlyphRenderData that generated the data.
◆ render_size()
vec2 fastuidraw::Glyph::render_size |
( |
void |
| ) |
const |
Returns ths rendering size of the glyph (in font coordinates). This value is similair in value to GlyphMetrics:size() but not necessarily idential (differnces come from discretization to pixels for example).
◆ renderer()
Returns the glyph's renderer, valid() must return true. If not, debug builds FASTUIDRAWassert and release builds crash.
◆ type()
enum glyph_type fastuidraw::Glyph::type |
( |
void |
| ) |
const |
Returns the glyph's rendering type, valid() must return true. If not, debug builds FASTUIDRAWassert and release builds crash.
◆ upload_to_atlas()
enum return_code fastuidraw::Glyph::upload_to_atlas |
( |
void |
| ) |
const |
◆ uploaded_to_atlas()
bool fastuidraw::Glyph::uploaded_to_atlas |
( |
void |
| ) |
const |
◆ valid()
bool fastuidraw::Glyph::valid |
( |
void |
| ) |
const |
|
inline |
Returns true if the Glyph refers to actual glyph data
Definition at line 64 of file glyph.hpp.
The documentation for this class was generated from the following file:
- /home/kevin/fastuidraw.krogueintel/inc/fastuidraw/text/glyph.hpp