[core] Update shaders.
Implements 'icon-pitch-alignment' (issue #9345) Fixes issue #9456 (map-aligned point label regression)
This commit is contained in:
@@ -45,6 +45,7 @@ auto makeLayoutPropertySetters() {
|
||||
result["icon-padding"] = &setProperty<V, SymbolLayer, PropertyValue<float>, &SymbolLayer::setIconPadding>;
|
||||
result["icon-keep-upright"] = &setProperty<V, SymbolLayer, PropertyValue<bool>, &SymbolLayer::setIconKeepUpright>;
|
||||
result["icon-offset"] = &setProperty<V, SymbolLayer, DataDrivenPropertyValue<std::array<float, 2>>, &SymbolLayer::setIconOffset>;
|
||||
result["icon-pitch-alignment"] = &setProperty<V, SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setIconPitchAlignment>;
|
||||
result["text-pitch-alignment"] = &setProperty<V, SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setTextPitchAlignment>;
|
||||
result["text-rotation-alignment"] = &setProperty<V, SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setTextRotationAlignment>;
|
||||
result["text-field"] = &setProperty<V, SymbolLayer, DataDrivenPropertyValue<std::string>, &SymbolLayer::setTextField>;
|
||||
|
||||
@@ -98,6 +98,10 @@ public:
|
||||
DataDrivenPropertyValue<std::array<float, 2>> getIconOffset() const;
|
||||
void setIconOffset(DataDrivenPropertyValue<std::array<float, 2>>);
|
||||
|
||||
static PropertyValue<AlignmentType> getDefaultIconPitchAlignment();
|
||||
PropertyValue<AlignmentType> getIconPitchAlignment() const;
|
||||
void setIconPitchAlignment(PropertyValue<AlignmentType>);
|
||||
|
||||
static PropertyValue<AlignmentType> getDefaultTextPitchAlignment();
|
||||
PropertyValue<AlignmentType> getTextPitchAlignment() const;
|
||||
void setTextPitchAlignment(PropertyValue<AlignmentType>);
|
||||
|
||||
@@ -15,6 +15,10 @@ public:
|
||||
constexpr uint32_t area() const {
|
||||
return width * height;
|
||||
}
|
||||
|
||||
constexpr float aspectRatio() const {
|
||||
return static_cast<float>(width) / static_cast<float>(height);
|
||||
}
|
||||
|
||||
constexpr bool isEmpty() const {
|
||||
return width == 0 || height == 0;
|
||||
|
||||
Reference in New Issue
Block a user