A container for caching a glyph atlas across frames. More...
#include <glyph_atlas.h>
Public Member Functions | |
GlyphAtlasContext (GlyphAtlas::Type type) | |
virtual | ~GlyphAtlasContext () |
std::shared_ptr< GlyphAtlas > | GetGlyphAtlas () const |
Retrieve the current glyph atlas. More... | |
const ISize & | GetAtlasSize () const |
Retrieve the size of the current glyph atlas. More... | |
std::shared_ptr< RectanglePacker > | GetRectPacker () const |
Retrieve the previous (if any) rect packer. More... | |
int64_t | GetHeightAdjustment () const |
A y-coordinate shift that must be applied to glyphs appended to the atlas. More... | |
void | UpdateGlyphAtlas (std::shared_ptr< GlyphAtlas > atlas, ISize size, int64_t height_adjustment_) |
Update the context with a newly constructed glyph atlas. More... | |
void | UpdateRectPacker (std::shared_ptr< RectanglePacker > rect_packer) |
A container for caching a glyph atlas across frames.
Definition at line 218 of file glyph_atlas.h.
|
explicit |
Definition at line 14 of file glyph_atlas.cc.
|
virtual |
Definition at line 18 of file glyph_atlas.cc.
const ISize & impeller::GlyphAtlasContext::GetAtlasSize | ( | ) | const |
Retrieve the size of the current glyph atlas.
Definition at line 24 of file glyph_atlas.cc.
std::shared_ptr< GlyphAtlas > impeller::GlyphAtlasContext::GetGlyphAtlas | ( | ) | const |
Retrieve the current glyph atlas.
Definition at line 20 of file glyph_atlas.cc.
int64_t impeller::GlyphAtlasContext::GetHeightAdjustment | ( | ) | const |
A y-coordinate shift that must be applied to glyphs appended to the atlas.
The rectangle packer is only initialized for unfilled regions of the atlas. The area the rectangle packer covers is offset from the origin by this height adjustment.
Definition at line 28 of file glyph_atlas.cc.
std::shared_ptr< RectanglePacker > impeller::GlyphAtlasContext::GetRectPacker | ( | ) | const |
Retrieve the previous (if any) rect packer.
Definition at line 32 of file glyph_atlas.cc.
void impeller::GlyphAtlasContext::UpdateGlyphAtlas | ( | std::shared_ptr< GlyphAtlas > | atlas, |
ISize | size, | ||
int64_t | height_adjustment_ | ||
) |
Update the context with a newly constructed glyph atlas.
Definition at line 36 of file glyph_atlas.cc.
void impeller::GlyphAtlasContext::UpdateRectPacker | ( | std::shared_ptr< RectanglePacker > | rect_packer | ) |
Definition at line 44 of file glyph_atlas.cc.