summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/background_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/layers/background_layer.cpp')
-rw-r--r--src/mbgl/style/layers/background_layer.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mbgl/style/layers/background_layer.cpp b/src/mbgl/style/layers/background_layer.cpp
index e2a517b9f4..b4ffea138b 100644
--- a/src/mbgl/style/layers/background_layer.cpp
+++ b/src/mbgl/style/layers/background_layer.cpp
@@ -8,13 +8,13 @@ namespace mbgl {
namespace style {
BackgroundLayer::BackgroundLayer(const std::string& layerID)
- : Layer(Type::Background, std::make_unique<Impl>())
+ : Layer(LayerType::Background, std::make_unique<Impl>())
, impl(static_cast<Impl*>(baseImpl.get())) {
impl->id = layerID;
}
BackgroundLayer::BackgroundLayer(const Impl& other)
- : Layer(Type::Background, std::make_unique<Impl>(other))
+ : Layer(LayerType::Background, std::make_unique<Impl>(other))
, impl(static_cast<Impl*>(baseImpl.get())) {
}
@@ -27,7 +27,7 @@ std::unique_ptr<Layer> BackgroundLayer::Impl::clone() const {
std::unique_ptr<Layer> BackgroundLayer::Impl::cloneRef(const std::string& id_) const {
auto result = std::make_unique<BackgroundLayer>(*this);
result->impl->id = id_;
- result->impl->paint = BackgroundPaintProperties();
+ result->impl->cascading = BackgroundPaintProperties::Cascading();
return std::move(result);
}
@@ -45,22 +45,22 @@ PropertyValue<Color> BackgroundLayer::getDefaultBackgroundColor() {
}
PropertyValue<Color> BackgroundLayer::getBackgroundColor(const optional<std::string>& klass) const {
- return impl->paint.get<BackgroundColor>(klass);
+ return impl->cascading.template get<BackgroundColor>().get(klass);
}
void BackgroundLayer::setBackgroundColor(PropertyValue<Color> value, const optional<std::string>& klass) {
if (value == getBackgroundColor(klass))
return;
- impl->paint.set<BackgroundColor>(value, klass);
+ impl->cascading.template get<BackgroundColor>().set(value, klass);
impl->observer->onLayerPaintPropertyChanged(*this);
}
void BackgroundLayer::setBackgroundColorTransition(const TransitionOptions& value, const optional<std::string>& klass) {
- impl->paint.setTransition<BackgroundColor>(value, klass);
+ impl->cascading.template get<BackgroundColor>().setTransition(value, klass);
}
TransitionOptions BackgroundLayer::getBackgroundColorTransition(const optional<std::string>& klass) const {
- return impl->paint.getTransition<BackgroundColor>(klass);
+ return impl->cascading.template get<BackgroundColor>().getTransition(klass);
}
PropertyValue<std::string> BackgroundLayer::getDefaultBackgroundPattern() {
@@ -68,22 +68,22 @@ PropertyValue<std::string> BackgroundLayer::getDefaultBackgroundPattern() {
}
PropertyValue<std::string> BackgroundLayer::getBackgroundPattern(const optional<std::string>& klass) const {
- return impl->paint.get<BackgroundPattern>(klass);
+ return impl->cascading.template get<BackgroundPattern>().get(klass);
}
void BackgroundLayer::setBackgroundPattern(PropertyValue<std::string> value, const optional<std::string>& klass) {
if (value == getBackgroundPattern(klass))
return;
- impl->paint.set<BackgroundPattern>(value, klass);
+ impl->cascading.template get<BackgroundPattern>().set(value, klass);
impl->observer->onLayerPaintPropertyChanged(*this);
}
void BackgroundLayer::setBackgroundPatternTransition(const TransitionOptions& value, const optional<std::string>& klass) {
- impl->paint.setTransition<BackgroundPattern>(value, klass);
+ impl->cascading.template get<BackgroundPattern>().setTransition(value, klass);
}
TransitionOptions BackgroundLayer::getBackgroundPatternTransition(const optional<std::string>& klass) const {
- return impl->paint.getTransition<BackgroundPattern>(klass);
+ return impl->cascading.template get<BackgroundPattern>().getTransition(klass);
}
PropertyValue<float> BackgroundLayer::getDefaultBackgroundOpacity() {
@@ -91,22 +91,22 @@ PropertyValue<float> BackgroundLayer::getDefaultBackgroundOpacity() {
}
PropertyValue<float> BackgroundLayer::getBackgroundOpacity(const optional<std::string>& klass) const {
- return impl->paint.get<BackgroundOpacity>(klass);
+ return impl->cascading.template get<BackgroundOpacity>().get(klass);
}
void BackgroundLayer::setBackgroundOpacity(PropertyValue<float> value, const optional<std::string>& klass) {
if (value == getBackgroundOpacity(klass))
return;
- impl->paint.set<BackgroundOpacity>(value, klass);
+ impl->cascading.template get<BackgroundOpacity>().set(value, klass);
impl->observer->onLayerPaintPropertyChanged(*this);
}
void BackgroundLayer::setBackgroundOpacityTransition(const TransitionOptions& value, const optional<std::string>& klass) {
- impl->paint.setTransition<BackgroundOpacity>(value, klass);
+ impl->cascading.template get<BackgroundOpacity>().setTransition(value, klass);
}
TransitionOptions BackgroundLayer::getBackgroundOpacityTransition(const optional<std::string>& klass) const {
- return impl->paint.getTransition<BackgroundOpacity>(klass);
+ return impl->cascading.template get<BackgroundOpacity>().getTransition(klass);
}
} // namespace style