MCPcopy Create free account
hub / github.com/Tencent/libpag / GetGlyphs

Function GetGlyphs

src/rendering/caches/TextContentCache.cpp:140–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140std::pair<std::vector<GlyphHandle>, std::vector<GlyphHandle>> GetGlyphs(
141 const std::vector<std::vector<GlyphHandle>>& glyphLines) {
142 std::vector<GlyphHandle> simpleGlyphs = {};
143 std::vector<GlyphHandle> colorGlyphs = {};
144 for (auto& line : glyphLines) {
145 for (auto& glyph : line) {
146 simpleGlyphs.push_back(glyph);
147 if (glyph->getFont().hasColor()) {
148 colorGlyphs.push_back(glyph);
149 }
150 }
151 }
152 return {simpleGlyphs, colorGlyphs};
153}
154
155GraphicContent* TextContentCache::createContent(Frame layerFrame) const {
156 auto textDocument = sourceText->getValueAt(layerFrame).get();

Callers 1

createContentMethod · 0.85

Calls 2

push_backMethod · 0.80
getFontMethod · 0.80

Tested by

no test coverage detected