summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llmr/style/properties.hpp4
-rw-r--r--src/style/style.cpp8
-rw-r--r--src/style/style_parser.cpp8
3 files changed, 20 insertions, 0 deletions
diff --git a/include/llmr/style/properties.hpp b/include/llmr/style/properties.hpp
index ba0979cb93..616936ea8f 100644
--- a/include/llmr/style/properties.hpp
+++ b/include/llmr/style/properties.hpp
@@ -155,6 +155,8 @@ struct FillClass {
boost::optional<FunctionProperty> opacity;
boost::optional<PropertyTransition> opacity_transition;
boost::optional<std::string> image;
+ boost::optional<FunctionProperty> prerendered;
+ boost::optional<FunctionProperty> blur;
};
struct FillProperties {
@@ -166,6 +168,8 @@ struct FillProperties {
Color fill_color = {{ 0, 0, 0, 1 }};
Color stroke_color = {{ 0, 0, 0, 1 }};
float opacity = 1.0;
+ bool prerendered = false;
+ float blur = 0.0f;
std::string image;
};
diff --git a/src/style/style.cpp b/src/style/style.cpp
index 918709924c..fce70eadeb 100644
--- a/src/style/style.cpp
+++ b/src/style/style.cpp
@@ -114,6 +114,14 @@ void Style::cascade(float z) {
if (layer.image) {
fill.image = layer.image.get();
}
+
+ if (layer.prerendered) {
+ fill.prerendered = layer.prerendered.get().evaluate<bool>(z);
+ }
+
+ if (layer.blur) {
+ fill.blur = layer.blur.get().evaluate<float>(z);
+ }
}
// Cascade line classes.
diff --git a/src/style/style_parser.cpp b/src/style/style_parser.cpp
index c299f1fd9a..52ef85f1dc 100644
--- a/src/style/style_parser.cpp
+++ b/src/style/style_parser.cpp
@@ -537,6 +537,14 @@ FillClass StyleParser::parseFillClass(JSVal value) {
klass.antialias = parseBoolean(value["antialias"]);
}
+ if (value.HasMember("prerendered")) {
+ klass.prerendered = parseBoolean(value["prerendered"]);
+ }
+
+ if (value.HasMember("blur")) {
+ klass.blur = parseFunction(value["blur"]);
+ }
+
if (value.HasMember("image")) {
klass.image = parseString(value["image"]);
}