|
Ion
|
A Layout instance specifies how glyphs are arranged to form text. More...
#include "layout.h"
Classes | |
| struct | Glyph |
| A Glyph represents one character glyph in the layout. More... | |
| struct | Quad |
| A Quad represents a 3D quadrilateral onto which a character glyph in the layout will be drawn. More... | |
Public Member Functions | |
| Layout () | |
| ~Layout () | |
| bool | AddGlyph (const Glyph &glyph) |
| Adds a Glyph to the layout. More... | |
| size_t | GetGlyphCount () const |
| Returns the number of glyphs added to the layout. More... | |
| void | Reserve (size_t s) |
Reserves space for at least s glyphs. More... | |
| const Glyph & | GetGlyph (size_t i) const |
| Returns the indexed glyph. More... | |
| bool | ReplaceGlyph (size_t i, const Glyph &new_glyph) |
| Modifies the indexed glyph. More... | |
| void | GetGlyphSet (GlyphSet *glyphs) const |
Populates glyphs with the glyph indexes appearing in this Layout. More... | |
| float | GetLineAdvanceHeight () const |
| Returns the vertical distance between successive baselines in multiline text, scaled to the same units as the glyph's Quads. More... | |
| void | SetLineAdvanceHeight (float line_advance) |
| Sets the vertical distance between successive baselines. More... | |
A Layout instance specifies how glyphs are arranged to form text.
Each glyph is represented by four 3D points forming a quadrilateral covered by the glyph and the index of the glyph's character within the font.
Adds a Glyph to the layout.
Does nothing but return false if the index is invalid.
Definition at line 23 of file layout.cc.
References ion::text::Layout::Glyph::glyph_index.
| const Layout::Glyph & ion::text::Layout::GetGlyph | ( | size_t | i | ) | const |
Returns the indexed glyph.
Returns an invalid reference if the index does not refer to a previously-added glyph.
Definition at line 35 of file layout.cc.
Referenced by ion::text::operator<<(), and ion::text::Builder::StoreGlyphVertices().
| size_t ion::text::Layout::GetGlyphCount | ( | ) | const |
Returns the number of glyphs added to the layout.
Definition at line 31 of file layout.cc.
Referenced by ion::text::Builder::Build(), ion::text::BasicBuilder::BuildVertexData(), ion::text::OutlineBuilder::BuildVertexData(), and ion::text::operator<<().
| void ion::text::Layout::GetGlyphSet | ( | GlyphSet * | glyphs | ) | const |
| float ion::text::Layout::GetLineAdvanceHeight | ( | ) | const |
Modifies the indexed glyph.
Does nothing but return false if the index does not refer to a previously-added glyph or the glyph's index is invalid.
Definition at line 39 of file layout.cc.
References ion::text::Layout::Glyph::glyph_index.
| void ion::text::Layout::Reserve | ( | size_t | s | ) |
| void ion::text::Layout::SetLineAdvanceHeight | ( | float | line_advance | ) |
Sets the vertical distance between successive baselines.
Definition at line 56 of file layout.cc.
Referenced by ion::text::LayOutText().