summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mbgl/layout/symbol_instance.cpp2
-rw-r--r--src/mbgl/layout/symbol_instance.hpp2
-rw-r--r--src/mbgl/layout/symbol_layout.cpp2
-rw-r--r--src/mbgl/text/quads.cpp4
-rw-r--r--src/mbgl/text/quads.hpp4
-rw-r--r--test/text/quads.test.cpp24
6 files changed, 19 insertions, 19 deletions
diff --git a/src/mbgl/layout/symbol_instance.cpp b/src/mbgl/layout/symbol_instance.cpp
index 2264bfdc92..8bdc528bbb 100644
--- a/src/mbgl/layout/symbol_instance.cpp
+++ b/src/mbgl/layout/symbol_instance.cpp
@@ -9,7 +9,7 @@ SymbolInstance::SymbolInstance(Anchor& anchor,
const GeometryCoordinates& line,
const std::pair<Shaping, Shaping>& shapedTextOrientations,
const PositionedIcon& shapedIcon,
- const SymbolLayoutProperties::PossiblyEvaluated& layout,
+ const SymbolLayoutProperties::Evaluated& layout,
const bool addToBuffers,
const uint32_t index_,
const float textBoxScale,
diff --git a/src/mbgl/layout/symbol_instance.hpp b/src/mbgl/layout/symbol_instance.hpp
index 0980eb492b..70ebfeefa2 100644
--- a/src/mbgl/layout/symbol_instance.hpp
+++ b/src/mbgl/layout/symbol_instance.hpp
@@ -16,7 +16,7 @@ public:
const GeometryCoordinates& line,
const std::pair<Shaping, Shaping>& shapedTextOrientations,
const PositionedIcon& shapedIcon,
- const style::SymbolLayoutProperties::PossiblyEvaluated&,
+ const style::SymbolLayoutProperties::Evaluated&,
const bool inside,
const uint32_t index,
const float textBoxScale,
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp
index 8e36bb84ea..7b77bdaf6f 100644
--- a/src/mbgl/layout/symbol_layout.cpp
+++ b/src/mbgl/layout/symbol_layout.cpp
@@ -347,7 +347,7 @@ void SymbolLayout::addFeature(const std::size_t index,
const bool addToBuffers = mode == MapMode::Still || withinPlus0;
- symbolInstances.emplace_back(anchor, line, shapedTextOrientations, shapedIcon, layout, addToBuffers, symbolInstances.size(),
+ symbolInstances.emplace_back(anchor, line, shapedTextOrientations, shapedIcon, layout.evaluate(zoom, feature), addToBuffers, symbolInstances.size(),
textBoxScale, textPadding, textPlacement,
iconBoxScale, iconPadding, iconPlacement,
face, indexedFeature, index);
diff --git a/src/mbgl/text/quads.cpp b/src/mbgl/text/quads.cpp
index d3edafa1a0..b13a6a71e5 100644
--- a/src/mbgl/text/quads.cpp
+++ b/src/mbgl/text/quads.cpp
@@ -18,7 +18,7 @@ const float globalMinScale = 0.5f; // underscale by 1 zoom level
SymbolQuad getIconQuad(const Anchor& anchor,
const PositionedIcon& shapedIcon,
const GeometryCoordinates& line,
- const SymbolLayoutProperties::PossiblyEvaluated& layout,
+ const SymbolLayoutProperties::Evaluated& layout,
const style::SymbolPlacementType placement,
const Shaping& shapedText) {
auto image = *(shapedIcon.image);
@@ -292,7 +292,7 @@ SymbolQuads getGlyphQuads(Anchor& anchor,
const Shaping& shapedText,
const float boxScale,
const GeometryCoordinates& line,
- const SymbolLayoutProperties::PossiblyEvaluated& layout,
+ const SymbolLayoutProperties::Evaluated& layout,
const style::SymbolPlacementType placement,
const GlyphPositions& face) {
const float textRotate = layout.get<TextRotate>() * util::DEG2RAD;
diff --git a/src/mbgl/text/quads.hpp b/src/mbgl/text/quads.hpp
index 7e3b5ca405..f1529d8829 100644
--- a/src/mbgl/text/quads.hpp
+++ b/src/mbgl/text/quads.hpp
@@ -54,7 +54,7 @@ typedef std::vector<SymbolQuad> SymbolQuads;
SymbolQuad getIconQuad(const Anchor& anchor,
const PositionedIcon& shapedIcon,
const GeometryCoordinates& line,
- const style::SymbolLayoutProperties::PossiblyEvaluated&,
+ const style::SymbolLayoutProperties::Evaluated&,
style::SymbolPlacementType placement,
const Shaping& shapedText);
@@ -62,7 +62,7 @@ SymbolQuads getGlyphQuads(Anchor& anchor,
const Shaping& shapedText,
const float boxScale,
const GeometryCoordinates& line,
- const style::SymbolLayoutProperties::PossiblyEvaluated&,
+ const style::SymbolLayoutProperties::Evaluated&,
style::SymbolPlacementType placement,
const GlyphPositions& face);
diff --git a/test/text/quads.test.cpp b/test/text/quads.test.cpp
index dc81a34312..42bc0f2048 100644
--- a/test/text/quads.test.cpp
+++ b/test/text/quads.test.cpp
@@ -10,7 +10,7 @@ using namespace mbgl;
using namespace mbgl::style;
TEST(getIconQuads, normal) {
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
Anchor anchor(2.0, 3.0, 0.0, 0.5f, 0);
SpriteAtlasElement image = {
Rect<uint16_t>( 0, 0, 15, 11 ),
@@ -59,7 +59,7 @@ TEST(getIconQuads, style) {
// none
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
SymbolQuad quad =
getIconQuad(anchor, shapedIcon, line, layout, SymbolPlacementType::Point, shapedText);
@@ -80,7 +80,7 @@ TEST(getIconQuads, style) {
// width
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
layout.get<TextSize>() = 24.0f;
layout.get<IconTextFit>() = IconTextFitType::Width;
SymbolQuad quad =
@@ -98,7 +98,7 @@ TEST(getIconQuads, style) {
// width x textSize
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
layout.get<TextSize>() = 12.0f;
layout.get<IconTextFit>() = IconTextFitType::Width;
SymbolQuad quad =
@@ -116,7 +116,7 @@ TEST(getIconQuads, style) {
// width x textSize + padding
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
layout.get<TextSize>() = 12.0f;
layout.get<IconTextFit>() = IconTextFitType::Width;
layout.get<IconTextFitPadding>()[0] = 5.0f;
@@ -138,7 +138,7 @@ TEST(getIconQuads, style) {
// height
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
layout.get<TextSize>() = 24.0f;
layout.get<IconTextFit>() = IconTextFitType::Height;
SymbolQuad quad =
@@ -156,7 +156,7 @@ TEST(getIconQuads, style) {
// height x textSize
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
layout.get<TextSize>() = 12.0f;
layout.get<IconTextFit>() = IconTextFitType::Height;
SymbolQuad quad =
@@ -174,7 +174,7 @@ TEST(getIconQuads, style) {
// height x textSize + padding
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
layout.get<TextSize>() = 12.0f;
layout.get<IconTextFit>() = IconTextFitType::Height;
layout.get<IconTextFitPadding>()[0] = 5.0f;
@@ -196,7 +196,7 @@ TEST(getIconQuads, style) {
// both
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
layout.get<TextSize>() = 24.0f;
layout.get<IconTextFit>() = IconTextFitType::Both;
SymbolQuad quad =
@@ -214,7 +214,7 @@ TEST(getIconQuads, style) {
// both x textSize
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
layout.get<TextSize>() = 12.0f;
layout.get<IconTextFit>() = IconTextFitType::Both;
SymbolQuad quad =
@@ -232,7 +232,7 @@ TEST(getIconQuads, style) {
// both x textSize + padding
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
layout.get<TextSize>() = 12.0f;
layout.get<IconTextFit>() = IconTextFitType::Both;
layout.get<IconTextFitPadding>()[0] = 5.0f;
@@ -254,7 +254,7 @@ TEST(getIconQuads, style) {
// both x textSize + padding t/r/b/l
{
- SymbolLayoutProperties::PossiblyEvaluated layout;
+ SymbolLayoutProperties::Evaluated layout;
layout.get<TextSize>() = 12.0f;
layout.get<IconTextFit>() = IconTextFitType::Both;
layout.get<IconTextFitPadding>()[0] = 0.0f;