diff --git a/include/llmr/style/properties.hpp b/include/llmr/style/properties.hpp index 41481fbbc..978b4be15 100644 --- a/include/llmr/style/properties.hpp +++ b/include/llmr/style/properties.hpp @@ -136,8 +136,8 @@ struct TextClass { TranslateAnchor translateAnchor = TranslateAnchor::Map; Color color = {{ 0, 0, 0, 1 }}; Color halo = {{ 1, 1, 1, 0.75 }}; - FunctionProperty haloRadius = 0.25f; - FunctionProperty haloBlur = 1.0f; + FunctionProperty halo_radius = 0.25f; + FunctionProperty halo_blur = 1.0f; FunctionProperty size = 12.0f; FunctionProperty rotate = 0.0f; FunctionProperty alwaysVisible = false; @@ -150,8 +150,8 @@ struct TextProperties { TranslateAnchor translateAnchor = TranslateAnchor::Map; Color color = {{ 0, 0, 0, 1 }}; Color halo = {{ 1, 1, 1, 0.75 }}; - float haloRadius = 0.25f; - float haloBlur = 1.0f; + float halo_radius = 0.25f; + float halo_blur = 1.0f; float size = 12.0f; float rotate = 0.0f; bool alwaysVisible = false; diff --git a/src/renderer/painter_text.cpp b/src/renderer/painter_text.cpp index 0366014bb..e58de29b2 100644 --- a/src/renderer/painter_text.cpp +++ b/src/renderer/painter_text.cpp @@ -96,9 +96,9 @@ void Painter::renderText(TextBucket& bucket, const std::string& layer_name, cons // We're drawing in the translucent pass which is bottom-to-top, so we need // to draw the halo first. if (properties.halo[3] > 0.0f) { - textShader->setGamma(properties.haloBlur * 2.4f / fontSize / map.getState().getPixelRatio()); + textShader->setGamma(properties.halo_blur * 2.4f / fontSize / map.getState().getPixelRatio()); textShader->setColor(properties.halo); - textShader->setBuffer(properties.haloRadius); + textShader->setBuffer(properties.halo_radius); glDepthRange(strata, 1.0f); bucket.drawGlyphs(*textShader); } diff --git a/src/style/style.cpp b/src/style/style.cpp index 6450fede5..578b2c013 100644 --- a/src/style/style.cpp +++ b/src/style/style.cpp @@ -111,8 +111,8 @@ void Style::cascade(float z) { text.color = layer.color; text.size = layer.size.evaluate(z); text.halo = layer.halo; - text.haloRadius = layer.haloRadius.evaluate(z); - text.haloBlur = layer.haloBlur.evaluate(z); + text.halo_radius = layer.halo_radius.evaluate(z); + text.halo_blur = layer.halo_blur.evaluate(z); text.rotate = layer.rotate.evaluate(z); text.alwaysVisible = layer.alwaysVisible.evaluate(z); text.opacity = layer.opacity.evaluate(z); diff --git a/src/style/style_parser.cpp b/src/style/style_parser.cpp index a7e0c7b22..9972c39ee 100644 --- a/src/style/style_parser.cpp +++ b/src/style/style_parser.cpp @@ -580,11 +580,11 @@ TextClass StyleParser::parseTextClass(JSVal value) { } if (value.HasMember("strokeWidth")) { - klass.haloRadius = parseFunction(value["strokeWidth"]); + klass.halo_radius = parseFunction(value["strokeWidth"]); } if (value.HasMember("strokeBlur")) { - klass.haloBlur = parseFunction(value["strokeBlur"]); + klass.halo_blur = parseFunction(value["strokeBlur"]); } if (value.HasMember("size")) {