summaryrefslogtreecommitdiff
path: root/include/llmr/style
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-06-30 17:41:25 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-06-30 17:41:25 +0200
commita6f7696feb466aeeab59d205b4f0b41e04cf9b60 (patch)
tree23c97fbe0a95785ff158a2ed21250283775d821c /include/llmr/style
parent18d898fae70681fba8cc31d73b581c360557746c (diff)
downloadqtlocation-mapboxgl-a6f7696feb466aeeab59d205b4f0b41e04cf9b60.tar.gz
add interpolation
Diffstat (limited to 'include/llmr/style')
-rw-r--r--include/llmr/style/applied_class_properties.hpp4
-rw-r--r--include/llmr/style/style.hpp2
-rw-r--r--include/llmr/style/style_layer.hpp2
-rw-r--r--include/llmr/style/style_layer_group.hpp1
4 files changed, 9 insertions, 0 deletions
diff --git a/include/llmr/style/applied_class_properties.hpp b/include/llmr/style/applied_class_properties.hpp
index cda3a42a48..0c80b0a173 100644
--- a/include/llmr/style/applied_class_properties.hpp
+++ b/include/llmr/style/applied_class_properties.hpp
@@ -34,6 +34,10 @@ public:
void add(ClassID class_id, timestamp begin, timestamp end, const PropertyValue &value) {
properties.emplace_back(class_id, begin, end, value);
}
+
+ bool hasTransitions() const {
+ return properties.size() > 1;
+ }
};
}
diff --git a/include/llmr/style/style.hpp b/include/llmr/style/style.hpp
index 6b9b4549cc..ec1be163f3 100644
--- a/include/llmr/style/style.hpp
+++ b/include/llmr/style/style.hpp
@@ -43,6 +43,8 @@ public:
// of applied classes.
void updateClasses();
+ bool hasTransitions() const;
+
public:
std::shared_ptr<Sprite> sprite;
std::shared_ptr<StyleLayerGroup> layers;
diff --git a/include/llmr/style/style_layer.hpp b/include/llmr/style/style_layer.hpp
index b04970f7c1..e27c5690c9 100644
--- a/include/llmr/style/style_layer.hpp
+++ b/include/llmr/style/style_layer.hpp
@@ -42,6 +42,8 @@ public:
void setClasses(const std::vector<std::string> &class_names, timestamp now,
const PropertyTransition &defaultTransition);
+ bool hasTransitions() const;
+
private:
// Applies all properties from a class, if they haven't been applied already.
void applyClassProperties(ClassID class_id, std::set<PropertyKey> &already_applied,
diff --git a/include/llmr/style/style_layer_group.hpp b/include/llmr/style/style_layer_group.hpp
index 2122c16286..90c02bc1f2 100644
--- a/include/llmr/style/style_layer_group.hpp
+++ b/include/llmr/style/style_layer_group.hpp
@@ -13,6 +13,7 @@ public:
const PropertyTransition &defaultTransition);
void updateProperties(float z, timestamp t);
+ bool hasTransitions() const;
public:
std::vector<std::shared_ptr<StyleLayer>> layers;
};