diff options
author | Molly Lloyd <molly@mapbox.com> | 2018-12-13 17:05:43 -0800 |
---|---|---|
committer | Molly Lloyd <molly@mapbox.com> | 2018-12-13 17:05:43 -0800 |
commit | 7db9ce37e648e8145816f11dcdb3251f0ce81d74 (patch) | |
tree | 8f6b8c96e9571355b72f6e2d633a5d8036eb59a8 /include/mbgl/style | |
parent | 98984ef2926dbd1cc6876880ac99cfa737f74a1c (diff) | |
download | qtlocation-mapboxgl-7db9ce37e648e8145816f11dcdb3251f0ce81d74.tar.gz |
[core] add dynamic-text-anchor property
Diffstat (limited to 'include/mbgl/style')
-rw-r--r-- | include/mbgl/style/conversion/constant.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/style/layers/symbol_layer.hpp | 8 | ||||
-rw-r--r-- | include/mbgl/style/types.hpp | 13 |
3 files changed, 26 insertions, 0 deletions
diff --git a/include/mbgl/style/conversion/constant.hpp b/include/mbgl/style/conversion/constant.hpp index 40657528c4..83785eed4e 100644 --- a/include/mbgl/style/conversion/constant.hpp +++ b/include/mbgl/style/conversion/constant.hpp @@ -54,6 +54,11 @@ struct Converter<std::vector<std::string>> { optional<std::vector<std::string>> operator()(const Convertible& value, Error& error) const; }; +template <> +struct Converter<std::vector<DynamicTextAnchorType>> { + optional<std::vector<DynamicTextAnchorType>> operator()(const Convertible& value, Error& error) const; +}; + } // namespace conversion } // namespace style } // namespace mbgl diff --git a/include/mbgl/style/layers/symbol_layer.hpp b/include/mbgl/style/layers/symbol_layer.hpp index 764f1585f6..eaba375ade 100644 --- a/include/mbgl/style/layers/symbol_layer.hpp +++ b/include/mbgl/style/layers/symbol_layer.hpp @@ -134,6 +134,14 @@ public: PropertyValue<TextJustifyType> getTextJustify() const; void setTextJustify(PropertyValue<TextJustifyType>); + static PropertyValue<float> getDefaultDynamicTextOffset(); + PropertyValue<float> getDynamicTextOffset() const; + void setDynamicTextOffset(PropertyValue<float>); + + static PropertyValue<std::vector<DynamicTextAnchorType>> getDefaultDynamicTextAnchor(); + PropertyValue<std::vector<DynamicTextAnchorType>> getDynamicTextAnchor() const; + void setDynamicTextAnchor(PropertyValue<std::vector<DynamicTextAnchorType>>); + static PropertyValue<SymbolAnchorType> getDefaultTextAnchor(); PropertyValue<SymbolAnchorType> getTextAnchor() const; void setTextAnchor(PropertyValue<SymbolAnchorType>); diff --git a/include/mbgl/style/types.hpp b/include/mbgl/style/types.hpp index ed875733c7..2a7635ff2d 100644 --- a/include/mbgl/style/types.hpp +++ b/include/mbgl/style/types.hpp @@ -98,6 +98,19 @@ enum class SymbolAnchorType : uint8_t { BottomRight }; +enum class DynamicTextAnchorType : uint8_t { + Auto, + Center, + Left, + Right, + Top, + Bottom, + TopLeft, + TopRight, + BottomLeft, + BottomRight +}; + enum class TextTransformType : uint8_t { None, Uppercase, |