[core] Add static getters for property default values (#6124)
This commit is contained in:
@@ -61,6 +61,10 @@ const Filter& FillLayer::getFilter() const {
|
||||
|
||||
// Paint properties
|
||||
|
||||
PropertyValue<bool> FillLayer::getDefaultFillAntialias() {
|
||||
return { true };
|
||||
}
|
||||
|
||||
PropertyValue<bool> FillLayer::getFillAntialias() const {
|
||||
return impl->paint.fillAntialias.get();
|
||||
}
|
||||
@@ -69,6 +73,10 @@ void FillLayer::setFillAntialias(PropertyValue<bool> value, const optional<std::
|
||||
impl->paint.fillAntialias.set(value, klass);
|
||||
}
|
||||
|
||||
PropertyValue<float> FillLayer::getDefaultFillOpacity() {
|
||||
return { 1 };
|
||||
}
|
||||
|
||||
PropertyValue<float> FillLayer::getFillOpacity() const {
|
||||
return impl->paint.fillOpacity.get();
|
||||
}
|
||||
@@ -77,6 +85,10 @@ void FillLayer::setFillOpacity(PropertyValue<float> value, const optional<std::s
|
||||
impl->paint.fillOpacity.set(value, klass);
|
||||
}
|
||||
|
||||
PropertyValue<Color> FillLayer::getDefaultFillColor() {
|
||||
return { Color::black() };
|
||||
}
|
||||
|
||||
PropertyValue<Color> FillLayer::getFillColor() const {
|
||||
return impl->paint.fillColor.get();
|
||||
}
|
||||
@@ -85,6 +97,10 @@ void FillLayer::setFillColor(PropertyValue<Color> value, const optional<std::str
|
||||
impl->paint.fillColor.set(value, klass);
|
||||
}
|
||||
|
||||
PropertyValue<Color> FillLayer::getDefaultFillOutlineColor() {
|
||||
return { {} };
|
||||
}
|
||||
|
||||
PropertyValue<Color> FillLayer::getFillOutlineColor() const {
|
||||
return impl->paint.fillOutlineColor.get();
|
||||
}
|
||||
@@ -93,6 +109,10 @@ void FillLayer::setFillOutlineColor(PropertyValue<Color> value, const optional<s
|
||||
impl->paint.fillOutlineColor.set(value, klass);
|
||||
}
|
||||
|
||||
PropertyValue<std::array<float, 2>> FillLayer::getDefaultFillTranslate() {
|
||||
return { {{ 0, 0 }} };
|
||||
}
|
||||
|
||||
PropertyValue<std::array<float, 2>> FillLayer::getFillTranslate() const {
|
||||
return impl->paint.fillTranslate.get();
|
||||
}
|
||||
@@ -101,6 +121,10 @@ void FillLayer::setFillTranslate(PropertyValue<std::array<float, 2>> value, cons
|
||||
impl->paint.fillTranslate.set(value, klass);
|
||||
}
|
||||
|
||||
PropertyValue<TranslateAnchorType> FillLayer::getDefaultFillTranslateAnchor() {
|
||||
return { TranslateAnchorType::Map };
|
||||
}
|
||||
|
||||
PropertyValue<TranslateAnchorType> FillLayer::getFillTranslateAnchor() const {
|
||||
return impl->paint.fillTranslateAnchor.get();
|
||||
}
|
||||
@@ -109,6 +133,10 @@ void FillLayer::setFillTranslateAnchor(PropertyValue<TranslateAnchorType> value,
|
||||
impl->paint.fillTranslateAnchor.set(value, klass);
|
||||
}
|
||||
|
||||
PropertyValue<std::string> FillLayer::getDefaultFillPattern() {
|
||||
return { "" };
|
||||
}
|
||||
|
||||
PropertyValue<std::string> FillLayer::getFillPattern() const {
|
||||
return impl->paint.fillPattern.get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user