summaryrefslogtreecommitdiff
path: root/src/mbgl/style
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style')
-rw-r--r--src/mbgl/style/layers/layer_properties.hpp.ejs13
-rw-r--r--src/mbgl/style/layers/line_layer_properties.hpp14
2 files changed, 10 insertions, 17 deletions
diff --git a/src/mbgl/style/layers/layer_properties.hpp.ejs b/src/mbgl/style/layers/layer_properties.hpp.ejs
index 11a1db33c7..277cfd173b 100644
--- a/src/mbgl/style/layers/layer_properties.hpp.ejs
+++ b/src/mbgl/style/layers/layer_properties.hpp.ejs
@@ -33,19 +33,15 @@ struct <%- camelize(property.name) %> : ColorRampProperty {
<% } else { -%>
struct <%- camelize(property.name) %> : <%- paintPropertyType(property, type) %> {
static <%- evaluatedType(property) %> defaultValue() { return <%- defaultValue(property) %>; }
+<% if (property.name === 'line-floor-width') { -%>
+ using EvaluatorType = DataDrivenPropertyEvaluator<float, true>;
+<% } -%>
<% if (isOverridable(property)) { -%>
static constexpr const char *name() { return "<%- property.name %>"; }
static constexpr auto expressionType() { return expression::type::<%- expressionType(property) %>{}; };
template<typename T> static bool hasOverride(const T& t) { return !!t.<%- camelizeWithLeadingLowercase(property.name) %>; };
<% } -%>
};
-<% if (property.name === 'line-width') { -%>
-
-struct LineFloorWidth : DataDrivenPaintProperty<float, attributes::floorwidth, uniforms::floorwidth> {
- using EvaluatorType = DataDrivenPropertyEvaluator<float, true>;
- static float defaultValue() { return 1.0f; }
-};
-<% } -%>
<% } -%>
<% } -%>
@@ -61,9 +57,6 @@ class <%- camelize(type) %>LayoutProperties : public Properties<
class <%- camelize(type) %>PaintProperties : public Properties<
<% for (const property of paintProperties.slice(0, -1)) { -%>
<%- camelize(property.name) %>,
-<% if (property.name === 'line-width') { -%>
- LineFloorWidth,
-<% } -%>
<% } -%>
<%- camelize(paintProperties.slice(-1)[0].name) %>
> {};
diff --git a/src/mbgl/style/layers/line_layer_properties.hpp b/src/mbgl/style/layers/line_layer_properties.hpp
index 5fcbecf3be..24a6c13675 100644
--- a/src/mbgl/style/layers/line_layer_properties.hpp
+++ b/src/mbgl/style/layers/line_layer_properties.hpp
@@ -54,11 +54,6 @@ struct LineWidth : DataDrivenPaintProperty<float, attributes::width, uniforms::w
static float defaultValue() { return 1; }
};
-struct LineFloorWidth : DataDrivenPaintProperty<float, attributes::floorwidth, uniforms::floorwidth> {
- using EvaluatorType = DataDrivenPropertyEvaluator<float, true>;
- static float defaultValue() { return 1.0f; }
-};
-
struct LineGapWidth : DataDrivenPaintProperty<float, attributes::gapwidth, uniforms::gapwidth> {
static float defaultValue() { return 0; }
};
@@ -82,6 +77,11 @@ struct LinePattern : CrossFadedDataDrivenPaintProperty<std::string, attributes::
struct LineGradient : ColorRampProperty {
};
+struct LineFloorWidth : DataDrivenPaintProperty<float, attributes::floorwidth, uniforms::floorwidth> {
+ static float defaultValue() { return 1; }
+ using EvaluatorType = DataDrivenPropertyEvaluator<float, true>;
+};
+
class LineLayoutProperties : public Properties<
LineCap,
LineJoin,
@@ -95,13 +95,13 @@ class LinePaintProperties : public Properties<
LineTranslate,
LineTranslateAnchor,
LineWidth,
- LineFloorWidth,
LineGapWidth,
LineOffset,
LineBlur,
LineDasharray,
LinePattern,
- LineGradient
+ LineGradient,
+ LineFloorWidth
> {};
class LineLayerProperties final : public LayerProperties {