summaryrefslogtreecommitdiff
path: root/include/mbgl/style/expression/interpolate.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/style/expression/interpolate.hpp')
-rw-r--r--include/mbgl/style/expression/interpolate.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mbgl/style/expression/interpolate.hpp b/include/mbgl/style/expression/interpolate.hpp
index c82c04bbb0..dbed74b4cd 100644
--- a/include/mbgl/style/expression/interpolate.hpp
+++ b/include/mbgl/style/expression/interpolate.hpp
@@ -70,6 +70,7 @@ public:
{}
const std::unique_ptr<Expression>& getInput() const { return input; }
+ const Interpolator& getInterpolator() const { return interpolator; }
void eachChild(const std::function<void(const Expression&)>& visit) const override {
visit(*input);
@@ -77,6 +78,12 @@ public:
visit(*stop.second);
}
}
+
+ void eachStop(const std::function<void(double, const Expression&)>& visit) const {
+ for (const auto& stop : stops) {
+ visit(stop.first, *stop.second);
+ }
+ }
// Return the smallest range of stops that covers the interval [lower, upper]
Range<float> getCoveringStops(const double lower, const double upper) const {