[core] Use PropertyValue<T> for Annotation line/fill
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <mbgl/util/geometry.hpp>
|
||||
#include <mbgl/util/variant.hpp>
|
||||
#include <mbgl/util/color.hpp>
|
||||
#include <mbgl/style/property_value.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
@@ -28,17 +29,17 @@ using ShapeAnnotationGeometry = variant<
|
||||
class LineAnnotation {
|
||||
public:
|
||||
ShapeAnnotationGeometry geometry;
|
||||
float opacity = 1;
|
||||
float width = 1;
|
||||
Color color = Color::black();
|
||||
style::PropertyValue<float> opacity { 1.0f };
|
||||
style::PropertyValue<float> width { 1.0f };
|
||||
style::PropertyValue<Color> color { Color::black() };
|
||||
};
|
||||
|
||||
class FillAnnotation {
|
||||
public:
|
||||
ShapeAnnotationGeometry geometry;
|
||||
float opacity = 1;
|
||||
Color color = Color::black();
|
||||
Color outlineColor = { 0, 0, 0, -1 };
|
||||
style::PropertyValue<float> opacity { 1.0f };
|
||||
style::PropertyValue<Color> color { Color::black() };
|
||||
style::PropertyValue<Color> outlineColor {};
|
||||
};
|
||||
|
||||
// An annotation whose type and properties are sourced from a style layer.
|
||||
|
||||
Reference in New Issue
Block a user