summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-03-07 18:34:45 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-03-29 16:18:41 +0200
commita6d8742e637a53eea90c2d0da049e684804928d3 (patch)
tree132a089ef42b4cc4e1b93b109b0a46850ddbde7e /include
parent4adfc5d3237bbca5c07898104267b17309f24ff3 (diff)
downloadqtlocation-mapboxgl-a6d8742e637a53eea90c2d0da049e684804928d3.tar.gz
[core] Enable text-variable-anchor property
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/style/conversion/constant.hpp5
-rw-r--r--include/mbgl/style/layers/symbol_layer.hpp4
-rw-r--r--include/mbgl/style/types.hpp2
3 files changed, 11 insertions, 0 deletions
diff --git a/include/mbgl/style/conversion/constant.hpp b/include/mbgl/style/conversion/constant.hpp
index 40657528c4..3a5833be64 100644
--- a/include/mbgl/style/conversion/constant.hpp
+++ b/include/mbgl/style/conversion/constant.hpp
@@ -34,6 +34,11 @@ struct Converter<T, typename std::enable_if_t<std::is_enum<T>::value>> {
optional<T> operator()(const Convertible& value, Error& error) const;
};
+template <class T>
+struct Converter<std::vector<T>, typename std::enable_if_t<std::is_enum<T>::value>> {
+ optional<std::vector<T>> operator()(const Convertible& value, Error& error) const;
+};
+
template <>
struct Converter<Color> {
optional<Color> operator()(const Convertible& value, Error& error) const;
diff --git a/include/mbgl/style/layers/symbol_layer.hpp b/include/mbgl/style/layers/symbol_layer.hpp
index 764f1585f6..46935ef535 100644
--- a/include/mbgl/style/layers/symbol_layer.hpp
+++ b/include/mbgl/style/layers/symbol_layer.hpp
@@ -134,6 +134,10 @@ public:
PropertyValue<TextJustifyType> getTextJustify() const;
void setTextJustify(PropertyValue<TextJustifyType>);
+ static PropertyValue<std::vector<TextVariableAnchorType>> getDefaultTextVariableAnchor();
+ PropertyValue<std::vector<TextVariableAnchorType>> getTextVariableAnchor() const;
+ void setTextVariableAnchor(PropertyValue<std::vector<TextVariableAnchorType>>);
+
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..a472c4fcec 100644
--- a/include/mbgl/style/types.hpp
+++ b/include/mbgl/style/types.hpp
@@ -98,6 +98,8 @@ enum class SymbolAnchorType : uint8_t {
BottomRight
};
+using TextVariableAnchorType = SymbolAnchorType;
+
enum class TextTransformType : uint8_t {
None,
Uppercase,