diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-03-20 18:08:01 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-03-29 16:18:41 +0200 |
commit | b39c71eea805d0551608f97ad1f35525d0586b14 (patch) | |
tree | aec6480c147f560dd3e50025b283e0f705ee2ac2 /src/mbgl/text/shaping.hpp | |
parent | 9fc42b9c3ceef09a51686a29985ce70dd0a78f6d (diff) | |
download | qtlocation-mapboxgl-b39c71eea805d0551608f97ad1f35525d0586b14.tar.gz |
[core] Introduce variable text placement for point labels - Layout part
Diffstat (limited to 'src/mbgl/text/shaping.hpp')
-rw-r--r-- | src/mbgl/text/shaping.hpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mbgl/text/shaping.hpp b/src/mbgl/text/shaping.hpp index 50ac893098..766b1ce233 100644 --- a/src/mbgl/text/shaping.hpp +++ b/src/mbgl/text/shaping.hpp @@ -7,6 +7,20 @@ namespace mbgl { +struct AnchorAlignment { + AnchorAlignment(float horizontal, float vertical) + : horizontalAlign(horizontal), verticalAlign(vertical) { + } + + static AnchorAlignment getAnchorAlignment(style::SymbolAnchorType anchor); + + float horizontalAlign; + float verticalAlign; +}; + +// Choose the justification that matches the direction of the TextAnchor +style::TextJustifyType getAnchorJustification(style::SymbolAnchorType anchor); + class SymbolFeature; class BiDi; @@ -53,7 +67,6 @@ const Shaping getShaping(const TaggedString& string, style::TextJustifyType textJustify, float spacing, const Point<float>& translate, - float verticalHeight, const WritingModeType, BiDi& bidi, const GlyphMap& glyphs); |