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-13 14:28:10 +0200 |
commit | 7966d067d322b9228829ffef9c5876cab214fd52 (patch) | |
tree | 5698b7853e85e29c0f72d995936ff372ec186c6d /src/mbgl/layout/symbol_instance.cpp | |
parent | 66a6f1fc105ef2c1f90e470b509a031280f81bec (diff) | |
download | qtlocation-mapboxgl-7966d067d322b9228829ffef9c5876cab214fd52.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() { |