diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-07-07 09:30:00 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-07-07 09:30:00 -0700 |
commit | c81780a9ca88dfa82624ccc62b8450fe44970018 (patch) | |
tree | 952844627899a77a57c0e10cf0c57064f22720af /include/llmr/style | |
parent | 3e54c59656429ed4f7f666a6c16d57853443e6f1 (diff) | |
parent | 9e9623d2ecbbbdd7411fe591892e2877870ce3b0 (diff) | |
download | qtlocation-mapboxgl-c81780a9ca88dfa82624ccc62b8450fe44970018.tar.gz |
Merge branch 'master' of https://github.com/mapbox/mapbox-gl-native
Conflicts:
src/style/style.cpp
Diffstat (limited to 'include/llmr/style')
-rw-r--r-- | include/llmr/style/style.hpp | 1 | ||||
-rw-r--r-- | include/llmr/style/style_bucket.hpp | 1 | ||||
-rw-r--r-- | include/llmr/style/types.hpp | 13 |
3 files changed, 15 insertions, 0 deletions
diff --git a/include/llmr/style/style.hpp b/include/llmr/style/style.hpp index c92e95a7ff..b6056986f8 100644 --- a/include/llmr/style/style.hpp +++ b/include/llmr/style/style.hpp @@ -39,6 +39,7 @@ public: void setAppliedClasses(const std::vector<std::string> &classes); const std::vector<std::string> &getAppliedClasses() const; + void setAppliedClasses(std::vector<std::string> &class_names); void toggleClass(const std::string &name); // Updates the styling information to reflect the current array diff --git a/include/llmr/style/style_bucket.hpp b/include/llmr/style/style_bucket.hpp index 1e3cb2db0a..b963caba80 100644 --- a/include/llmr/style/style_bucket.hpp +++ b/include/llmr/style/style_bucket.hpp @@ -40,6 +40,7 @@ class StyleBucketText { public: std::string field; TextPathType path = TextPathType::Default; + TextTransformType transform = TextTransformType::Default; std::string font; float max_size = 16.0f; float max_width = 15.0f * 24; diff --git a/include/llmr/style/types.hpp b/include/llmr/style/types.hpp index 95365947f4..fd862c00d4 100644 --- a/include/llmr/style/types.hpp +++ b/include/llmr/style/types.hpp @@ -52,6 +52,13 @@ enum class TextPathType : uint8_t { Default = Horizontal }; +enum class TextTransformType : uint8_t { + None, + Uppercase, + Lowercase, + Default = None +}; + enum class TranslateAnchorType : uint8_t { Map, Viewport, @@ -98,6 +105,12 @@ inline TextPathType parseTextPathType(const std::string &path) { return TextPathType::Default; } +inline TextTransformType parseTextTransformType(const std::string& transform) { + if (transform == "uppercase") return TextTransformType::Uppercase; + if (transform == "lowercase") return TextTransformType::Lowercase; + return TextTransformType::Default; +}; + inline TranslateAnchorType parseTranslateAnchorType(const std::string &anchor) { if (anchor == "map") return TranslateAnchorType::Map; if (anchor == "viewport") return TranslateAnchorType::Viewport; |