diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-12-09 14:37:09 +0100 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-01-15 15:02:11 +0200 |
commit | 4b171cccf1c4012f8962b022f86c4ac8d73f09df (patch) | |
tree | 0653d4bdf5188c4346bba13ae6a34946776585d9 /src/mbgl/layout/symbol_instance.cpp | |
parent | d8d336160c49fcda3e2ace93393176d53440532b (diff) | |
download | qtlocation-mapboxgl-4b171cccf1c4012f8962b022f86c4ac8d73f09df.tar.gz |
[core] getGlyphQuad -> getGlyphQuads
Diffstat (limited to 'src/mbgl/layout/symbol_instance.cpp')
-rw-r--r-- | src/mbgl/layout/symbol_instance.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mbgl/layout/symbol_instance.cpp b/src/mbgl/layout/symbol_instance.cpp index 094f859830..5c92d2f678 100644 --- a/src/mbgl/layout/symbol_instance.cpp +++ b/src/mbgl/layout/symbol_instance.cpp @@ -31,10 +31,10 @@ SymbolInstanceSharedData::SymbolInstanceSharedData(GeometryCoordinates line_, : line(std::move(line_)) { // Create the quads used for rendering the icon and glyphs. if (shapedIcon) { - iconQuad = getIconQuad(*shapedIcon, getAnyShaping(shapedTextOrientations).writingMode, iconType); + iconQuads = getIconQuads(*shapedIcon, getAnyShaping(shapedTextOrientations).writingMode, iconType); if (verticallyShapedIcon) { - verticalIconQuad = - getIconQuad(*verticallyShapedIcon, shapedTextOrientations.vertical.writingMode, iconType); + verticalIconQuads = + getIconQuads(*verticallyShapedIcon, shapedTextOrientations.vertical.writingMode, iconType); } } @@ -130,6 +130,7 @@ SymbolInstance::SymbolInstance(Anchor& anchor_, centerJustifiedGlyphQuadsSize = sharedData->centerJustifiedGlyphQuads.size(); leftJustifiedGlyphQuadsSize = sharedData->leftJustifiedGlyphQuads.size(); verticalGlyphQuadsSize = sharedData->verticalGlyphQuads.size(); + iconQuadsSize = sharedData->iconQuads ? sharedData->iconQuads->size() : 0; if (rightJustifiedGlyphQuadsSize || centerJustifiedGlyphQuadsSize || leftJustifiedGlyphQuadsSize) { writingModes |= WritingModeType::Horizontal; @@ -165,11 +166,11 @@ const SymbolQuads& SymbolInstance::verticalGlyphQuads() const { return sharedData->verticalGlyphQuads; } -const optional<SymbolQuad>& SymbolInstance::iconQuad() const { +const optional<SymbolQuads>& SymbolInstance::iconQuads() const { assert(sharedData); - return sharedData->iconQuad; + return sharedData->iconQuads; } - + bool SymbolInstance::hasText() const { return static_cast<bool>(symbolContent & SymbolContent::Text); } @@ -182,9 +183,9 @@ bool SymbolInstance::hasSdfIcon() const { return static_cast<bool>(symbolContent & SymbolContent::IconSDF); } -const optional<SymbolQuad>& SymbolInstance::verticalIconQuad() const { +const optional<SymbolQuads>& SymbolInstance::verticalIconQuads() const { assert(sharedData); - return sharedData->verticalIconQuad; + return sharedData->verticalIconQuads; } void SymbolInstance::releaseSharedData() { |