diff options
author | Nicki Dlugash <nicki@mapbox.com> | 2015-06-16 20:33:23 -0400 |
---|---|---|
committer | Nicki Dlugash <nicki@mapbox.com> | 2015-07-09 18:52:12 -0400 |
commit | f27bd6b68fc5f3faca29f4a86a5bf8d6ab747aba (patch) | |
tree | 091b8f8f3509354f3a41d671c344fc61330419b2 /src/mbgl/text/glyph.hpp | |
parent | 987d961e5bd2a7b9a68c4f05dd8b599eb1357add (diff) | |
download | qtlocation-mapboxgl-f27bd6b68fc5f3faca29f4a86a5bf8d6ab747aba.tar.gz |
Updates to labels along lines
Added a filter to remove anchors with the same text that are too close to each other.
Updates to spacing and offset of anchor placement along lines:
Takes into account icon size for calculating label length.
Recalculates spacing for long labels.
Adjusts offsets to first anchors if line is continued from outside the tile boundary.
Diffstat (limited to 'src/mbgl/text/glyph.hpp')
-rw-r--r-- | src/mbgl/text/glyph.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mbgl/text/glyph.hpp b/src/mbgl/text/glyph.hpp index be7c9befd5..334e1428c3 100644 --- a/src/mbgl/text/glyph.hpp +++ b/src/mbgl/text/glyph.hpp @@ -58,9 +58,10 @@ public: class Shaping { public: inline explicit Shaping() : top(0), bottom(0), left(0), right(0) {} - inline explicit Shaping(float x, float y) - : top(y), bottom(y), left(x), right(x) {} + inline explicit Shaping(float x, float y, std::u32string text_) + : text(text_), top(y), bottom(y), left(x), right(x) {} std::vector<PositionedGlyph> positionedGlyphs; + std::u32string text; int32_t top; int32_t bottom; int32_t left; |