summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/background_layer_properties.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/layers/background_layer_properties.hpp')
-rw-r--r--src/mbgl/style/layers/background_layer_properties.hpp38
1 files changed, 33 insertions, 5 deletions
diff --git a/src/mbgl/style/layers/background_layer_properties.hpp b/src/mbgl/style/layers/background_layer_properties.hpp
index 3a61392fb4..bd62ef0a58 100644
--- a/src/mbgl/style/layers/background_layer_properties.hpp
+++ b/src/mbgl/style/layers/background_layer_properties.hpp
@@ -24,11 +24,39 @@ struct BackgroundOpacity : PaintProperty<float> {
static float defaultValue() { return 1; }
};
-class BackgroundPaintProperties : public Properties<
- BackgroundColor,
- BackgroundPattern,
- BackgroundOpacity
-> {};
+class BackgroundPaintProperties {
+public:
+
+ class PossiblyEvaluated {
+ public:
+ Color backgroundColor;
+ Faded<std::string> backgroundPattern;
+ float backgroundOpacity;
+ };
+
+ class Unevaluated {
+ public:
+ style::Transitioning<PropertyValue<Color>> backgroundColor;
+ style::Transitioning<PropertyValue<std::string>> backgroundPattern;
+ style::Transitioning<PropertyValue<float>> backgroundOpacity;
+
+ bool hasTransition() const;
+ PossiblyEvaluated evaluate(const PropertyEvaluationParameters&) const;
+ };
+
+ class Transitionable {
+ public:
+ style::Transitionable<PropertyValue<Color>> backgroundColor;
+ style::Transitionable<PropertyValue<std::string>> backgroundPattern;
+ style::Transitionable<PropertyValue<float>> backgroundOpacity;
+
+ Unevaluated transitioned(const TransitionParameters&, Unevaluated&& prior) const;
+ Unevaluated untransitioned() const;
+
+ bool hasDataDrivenPropertyDifference(const Transitionable& other) const;
+ };
+};
+
} // namespace style
} // namespace mbgl