[core] Add static getters for property default values (#6124)

This commit is contained in:
John Firebaugh
2016-08-23 12:49:47 -07:00
committed by GitHub
parent fcb710fafe
commit 63cce78cf1
16 changed files with 455 additions and 9 deletions

View File

@@ -37,6 +37,10 @@ std::unique_ptr<Layer> BackgroundLayer::Impl::cloneRef(const std::string& id_) c
// Paint properties
PropertyValue<Color> BackgroundLayer::getDefaultBackgroundColor() {
return { Color::black() };
}
PropertyValue<Color> BackgroundLayer::getBackgroundColor() const {
return impl->paint.backgroundColor.get();
}
@@ -45,6 +49,10 @@ void BackgroundLayer::setBackgroundColor(PropertyValue<Color> value, const optio
impl->paint.backgroundColor.set(value, klass);
}
PropertyValue<std::string> BackgroundLayer::getDefaultBackgroundPattern() {
return { "" };
}
PropertyValue<std::string> BackgroundLayer::getBackgroundPattern() const {
return impl->paint.backgroundPattern.get();
}
@@ -53,6 +61,10 @@ void BackgroundLayer::setBackgroundPattern(PropertyValue<std::string> value, con
impl->paint.backgroundPattern.set(value, klass);
}
PropertyValue<float> BackgroundLayer::getDefaultBackgroundOpacity() {
return { 1 };
}
PropertyValue<float> BackgroundLayer::getBackgroundOpacity() const {
return impl->paint.backgroundOpacity.get();
}