diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-03-04 09:21:39 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-03-04 10:20:50 +0200 |
commit | 3bfdb110646f33953fe7c44a6f4db7cdbb540d6a (patch) | |
tree | debe16042c8eeac83a27e9608f5cca1127ef39e7 /src/mbgl/text/glyph.hpp | |
parent | 6802a2ec5c0bce57ac51462f123792f475c58419 (diff) | |
download | qtlocation-mapboxgl-3bfdb110646f33953fe7c44a6f4db7cdbb540d6a.tar.gz |
[core] Assign formatted section index to quads
Diffstat (limited to 'src/mbgl/text/glyph.hpp')
-rw-r--r-- | src/mbgl/text/glyph.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mbgl/text/glyph.hpp b/src/mbgl/text/glyph.hpp index 034784dc24..c97b242c10 100644 --- a/src/mbgl/text/glyph.hpp +++ b/src/mbgl/text/glyph.hpp @@ -19,7 +19,7 @@ namespace mbgl { using GlyphID = char16_t; using GlyphIDs = std::set<GlyphID>; - + // Note: this only works for the BMP GlyphRange getGlyphRange(GlyphID glyph); @@ -59,8 +59,8 @@ using GlyphMap = std::map<FontStackHash, Glyphs>; class PositionedGlyph { public: - explicit PositionedGlyph(GlyphID glyph_, float x_, float y_, bool vertical_, FontStackHash font_, float scale_) - : glyph(glyph_), x(x_), y(y_), vertical(vertical_), font(font_), scale(scale_) + explicit PositionedGlyph(GlyphID glyph_, float x_, float y_, bool vertical_, FontStackHash font_, float scale_, std::size_t sectionIndex_ = 0) + : glyph(glyph_), x(x_), y(y_), vertical(vertical_), font(font_), scale(scale_), sectionIndex(sectionIndex_) {} GlyphID glyph = 0; @@ -70,6 +70,8 @@ public: FontStackHash font = 0; float scale = 0.0; + // Maps positioned glyph to TaggedString section + std::size_t sectionIndex; }; enum class WritingModeType : uint8_t; |