diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2014-05-20 11:26:52 -0700 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2014-05-20 11:26:52 -0700 |
commit | 550e381e70dc462e24b6f73e3abd561d381123e3 (patch) | |
tree | 9a55e33ae391c3131abd80f10d50339243ca1f87 | |
parent | 2f7b038608347527693cd675fc134d12174b55b8 (diff) | |
download | qtlocation-mapboxgl-550e381e70dc462e24b6f73e3abd561d381123e3.tar.gz |
name text halo properties like others
-rw-r--r-- | include/llmr/style/properties.hpp | 8 | ||||
-rw-r--r-- | src/renderer/painter_text.cpp | 4 | ||||
-rw-r--r-- | src/style/style.cpp | 4 | ||||
-rw-r--r-- | src/style/style_parser.cpp | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/include/llmr/style/properties.hpp b/include/llmr/style/properties.hpp index 41481fbbc9..978b4be15f 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 0366014bb6..e58de29b27 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 6450fede5c..578b2c0131 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<float>(z); text.halo = layer.halo; - text.haloRadius = layer.haloRadius.evaluate<float>(z); - text.haloBlur = layer.haloBlur.evaluate<float>(z); + text.halo_radius = layer.halo_radius.evaluate<float>(z); + text.halo_blur = layer.halo_blur.evaluate<float>(z); text.rotate = layer.rotate.evaluate<float>(z); text.alwaysVisible = layer.alwaysVisible.evaluate<bool>(z); text.opacity = layer.opacity.evaluate<float>(z); diff --git a/src/style/style_parser.cpp b/src/style/style_parser.cpp index a7e0c7b226..9972c39eea 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")) { |