summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/hillshade_layer_properties.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/layers/hillshade_layer_properties.hpp')
-rw-r--r--src/mbgl/style/layers/hillshade_layer_properties.hpp50
1 files changed, 42 insertions, 8 deletions
diff --git a/src/mbgl/style/layers/hillshade_layer_properties.hpp b/src/mbgl/style/layers/hillshade_layer_properties.hpp
index 260d7ea808..df54c5a381 100644
--- a/src/mbgl/style/layers/hillshade_layer_properties.hpp
+++ b/src/mbgl/style/layers/hillshade_layer_properties.hpp
@@ -36,14 +36,48 @@ struct HillshadeAccentColor : PaintProperty<Color> {
static Color defaultValue() { return Color::black(); }
};
-class HillshadePaintProperties : public Properties<
- HillshadeIlluminationDirection,
- HillshadeIlluminationAnchor,
- HillshadeExaggeration,
- HillshadeShadowColor,
- HillshadeHighlightColor,
- HillshadeAccentColor
-> {};
+class HillshadePaintProperties {
+public:
+
+ class PossiblyEvaluated {
+ public:
+ float hillshadeIlluminationDirection;
+ HillshadeIlluminationAnchorType hillshadeIlluminationAnchor;
+ float hillshadeExaggeration;
+ Color hillshadeShadowColor;
+ Color hillshadeHighlightColor;
+ Color hillshadeAccentColor;
+ };
+
+ class Unevaluated {
+ public:
+ style::Transitioning<PropertyValue<float>> hillshadeIlluminationDirection;
+ style::Transitioning<PropertyValue<HillshadeIlluminationAnchorType>> hillshadeIlluminationAnchor;
+ style::Transitioning<PropertyValue<float>> hillshadeExaggeration;
+ style::Transitioning<PropertyValue<Color>> hillshadeShadowColor;
+ style::Transitioning<PropertyValue<Color>> hillshadeHighlightColor;
+ style::Transitioning<PropertyValue<Color>> hillshadeAccentColor;
+
+ bool hasTransition() const;
+ PossiblyEvaluated evaluate(const PropertyEvaluationParameters&) const;
+ };
+
+ class Transitionable {
+ public:
+ style::Transitionable<PropertyValue<float>> hillshadeIlluminationDirection;
+ style::Transitionable<PropertyValue<HillshadeIlluminationAnchorType>> hillshadeIlluminationAnchor;
+ style::Transitionable<PropertyValue<float>> hillshadeExaggeration;
+ style::Transitionable<PropertyValue<Color>> hillshadeShadowColor;
+ style::Transitionable<PropertyValue<Color>> hillshadeHighlightColor;
+ style::Transitionable<PropertyValue<Color>> hillshadeAccentColor;
+
+ Unevaluated transitioned(const TransitionParameters&, Unevaluated&& prior) const;
+ Unevaluated untransitioned() const;
+
+ bool hasDataDrivenPropertyDifference(const Transitionable& other) const;
+ };
+};
+
} // namespace style
} // namespace mbgl