summaryrefslogtreecommitdiff
path: root/src/mbgl/text/shaping.cpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-02 18:30:40 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-03 11:45:17 +0300
commit3b5a43c722e3dda1c05c37787296eab456614a77 (patch)
tree14bd39ed532a2087f883b5c16ecea51023ad2cf9 /src/mbgl/text/shaping.cpp
parent0fa5944f39854f42c86ce478da8869a8d4e3f1fe (diff)
downloadqtlocation-mapboxgl-3b5a43c722e3dda1c05c37787296eab456614a77.tar.gz
[core] Enable `text-offset` with variable label placement
Port of https://github.com/mapbox/mapbox-gl-js/pull/8642
Diffstat (limited to 'src/mbgl/text/shaping.cpp')
-rw-r--r--src/mbgl/text/shaping.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/text/shaping.cpp b/src/mbgl/text/shaping.cpp
index 0cb9ea73a9..d6d9a3d34e 100644
--- a/src/mbgl/text/shaping.cpp
+++ b/src/mbgl/text/shaping.cpp
@@ -413,7 +413,7 @@ const Shaping getShaping(const TaggedString& formattedString,
const style::SymbolAnchorType textAnchor,
const style::TextJustifyType textJustify,
const float spacing,
- const Point<float>& translate,
+ const std::array<float, 2>& translate,
const WritingModeType writingMode,
BiDi& bidi,
const GlyphMap& glyphs,
@@ -432,7 +432,7 @@ const Shaping getShaping(const TaggedString& formattedString,
reorderedLines.emplace_back(line, formattedString.getSections());
}
}
- Shaping shaping(translate.x, translate.y, writingMode, reorderedLines.size());
+ Shaping shaping(translate[0], translate[1], writingMode, reorderedLines.size());
shapeLines(shaping, reorderedLines, spacing, lineHeight, textAnchor,
textJustify, writingMode, glyphs, allowVerticalPlacement);