summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/buckets/symbol_bucket.hpp
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-08-08 13:56:22 +0300
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-08-20 12:31:02 +0300
commit9ba700fd47cccb3b615afae0b4b309c1e69da2f7 (patch)
tree3f788876e2a2be9d4787d81a961b660125b5546e /src/mbgl/renderer/buckets/symbol_bucket.hpp
parent073a243862ce9634cd7db2a06aebbd3ac60a7402 (diff)
downloadqtlocation-mapboxgl-9ba700fd47cccb3b615afae0b4b309c1e69da2f7.tar.gz
[core] Fix combination of icon-text-fit with text-variable-anchors and text-writing-mode
Diffstat (limited to 'src/mbgl/renderer/buckets/symbol_bucket.hpp')
-rw-r--r--src/mbgl/renderer/buckets/symbol_bucket.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp
index f47ced8331..20c0c5b790 100644
--- a/src/mbgl/renderer/buckets/symbol_bucket.hpp
+++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp
@@ -21,9 +21,9 @@ class CrossTileSymbolLayerIndex;
class PlacedSymbol {
public:
PlacedSymbol(Point<float> anchorPoint_, uint16_t segment_, float lowerSize_, float upperSize_,
- std::array<float, 2> lineOffset_, WritingModeType writingModes_, GeometryCoordinates line_, std::vector<float> tileDistances_) :
+ std::array<float, 2> lineOffset_, WritingModeType writingModes_, GeometryCoordinates line_, std::vector<float> tileDistances_, optional<size_t> placedIconIndex_ = nullopt) :
anchorPoint(anchorPoint_), segment(segment_), lowerSize(lowerSize_), upperSize(upperSize_),
- lineOffset(lineOffset_), writingModes(writingModes_), line(std::move(line_)), tileDistances(std::move(tileDistances_)), hidden(false), vertexStartIndex(0)
+ lineOffset(lineOffset_), writingModes(writingModes_), line(std::move(line_)), tileDistances(std::move(tileDistances_)), hidden(false), vertexStartIndex(0), placedIconIndex(std::move(placedIconIndex_))
{
}
Point<float> anchorPoint;
@@ -43,6 +43,9 @@ public:
// placement for orientation variants.
optional<style::TextWritingModeType> placedOrientation;
float angle = 0;
+
+ // Reference to placed icon, only applicable for text symbols.
+ optional<size_t> placedIconIndex;
};
class SymbolBucket final : public Bucket {