summaryrefslogtreecommitdiff
path: root/include/llmr
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2014-07-03 14:59:29 -0700
committerJustin R. Miller <incanus@codesorcery.net>2014-07-03 14:59:29 -0700
commitdcc075cb750ed52101a3cb9a21603de7769ee846 (patch)
tree4cb0bac216df2257e055867e30fcefce9247c59c /include/llmr
parent3554a3736a17780ab07179bb5b9c1cfa2cd6936f (diff)
parent17e489b2c6c3d273837ca1fd009ced72f69552fb (diff)
downloadqtlocation-mapboxgl-dcc075cb750ed52101a3cb9a21603de7769ee846.tar.gz
Merge branch 'master' of github.com:mapbox/llmr-native
Diffstat (limited to 'include/llmr')
-rw-r--r--include/llmr/style/style_bucket.hpp1
-rw-r--r--include/llmr/style/types.hpp13
2 files changed, 14 insertions, 0 deletions
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;