From 9eba2a66d107f30aa9216fb34ed62df60797986a Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 10 May 2017 12:37:46 -0700 Subject: [core, node, darwin, qt] Remove support for paint classes --- src/mbgl/style/layers/background_layer.cpp | 54 +++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'src/mbgl/style/layers/background_layer.cpp') diff --git a/src/mbgl/style/layers/background_layer.cpp b/src/mbgl/style/layers/background_layer.cpp index 6c9be96528..c4b22aa0e3 100644 --- a/src/mbgl/style/layers/background_layer.cpp +++ b/src/mbgl/style/layers/background_layer.cpp @@ -70,81 +70,81 @@ PropertyValue BackgroundLayer::getDefaultBackgroundColor() { return { Color::black() }; } -PropertyValue BackgroundLayer::getBackgroundColor(const optional& klass) const { - return impl().paint.template get().get(klass); +PropertyValue BackgroundLayer::getBackgroundColor() const { + return impl().paint.template get().value; } -void BackgroundLayer::setBackgroundColor(PropertyValue value, const optional& klass) { - if (value == getBackgroundColor(klass)) +void BackgroundLayer::setBackgroundColor(PropertyValue value) { + if (value == getBackgroundColor()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } -void BackgroundLayer::setBackgroundColorTransition(const TransitionOptions& value, const optional& klass) { +void BackgroundLayer::setBackgroundColorTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions BackgroundLayer::getBackgroundColorTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions BackgroundLayer::getBackgroundColorTransition() const { + return impl().paint.template get().options; } PropertyValue BackgroundLayer::getDefaultBackgroundPattern() { return { "" }; } -PropertyValue BackgroundLayer::getBackgroundPattern(const optional& klass) const { - return impl().paint.template get().get(klass); +PropertyValue BackgroundLayer::getBackgroundPattern() const { + return impl().paint.template get().value; } -void BackgroundLayer::setBackgroundPattern(PropertyValue value, const optional& klass) { - if (value == getBackgroundPattern(klass)) +void BackgroundLayer::setBackgroundPattern(PropertyValue value) { + if (value == getBackgroundPattern()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } -void BackgroundLayer::setBackgroundPatternTransition(const TransitionOptions& value, const optional& klass) { +void BackgroundLayer::setBackgroundPatternTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions BackgroundLayer::getBackgroundPatternTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions BackgroundLayer::getBackgroundPatternTransition() const { + return impl().paint.template get().options; } PropertyValue BackgroundLayer::getDefaultBackgroundOpacity() { return { 1 }; } -PropertyValue BackgroundLayer::getBackgroundOpacity(const optional& klass) const { - return impl().paint.template get().get(klass); +PropertyValue BackgroundLayer::getBackgroundOpacity() const { + return impl().paint.template get().value; } -void BackgroundLayer::setBackgroundOpacity(PropertyValue value, const optional& klass) { - if (value == getBackgroundOpacity(klass)) +void BackgroundLayer::setBackgroundOpacity(PropertyValue value) { + if (value == getBackgroundOpacity()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } -void BackgroundLayer::setBackgroundOpacityTransition(const TransitionOptions& value, const optional& klass) { +void BackgroundLayer::setBackgroundOpacityTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions BackgroundLayer::getBackgroundOpacityTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions BackgroundLayer::getBackgroundOpacityTransition() const { + return impl().paint.template get().options; } } // namespace style -- cgit v1.2.1