summaryrefslogtreecommitdiff
path: root/include/mbgl/annotation
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/annotation')
-rw-r--r--include/mbgl/annotation/shape_annotation.hpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/mbgl/annotation/shape_annotation.hpp b/include/mbgl/annotation/shape_annotation.hpp
index 90f2a96dd0..b220ef50cb 100644
--- a/include/mbgl/annotation/shape_annotation.hpp
+++ b/include/mbgl/annotation/shape_annotation.hpp
@@ -2,7 +2,7 @@
#define MBGL_ANNOTATION_SHAPE_ANNOTATION
#include <mbgl/annotation/annotation.hpp>
-#include <mbgl/style/style_properties.hpp>
+#include <mbgl/style/types.hpp>
#include <mbgl/util/geo.hpp>
@@ -13,12 +13,24 @@ namespace mbgl {
using AnnotationSegment = std::vector<LatLng>;
using AnnotationSegments = std::vector<AnnotationSegment>;
+struct FillAnnotationProperties {
+ float opacity = 1;
+ Color color = {{ 0, 0, 0, 1 }};
+ Color outlineColor = {{ 0, 0, 0, -1 }};
+};
+
+struct LineAnnotationProperties {
+ float opacity = 1;
+ float width = 1;
+ Color color = {{ 0, 0, 0, 1 }};
+};
+
class ShapeAnnotation {
public:
using Properties = mapbox::util::variant<
- FillPaintProperties, // creates a fill annotation
- LinePaintProperties, // creates a line annotation
- std::string>; // creates an annotation whose type and properties are sourced from a style layer
+ FillAnnotationProperties, // creates a fill annotation
+ LineAnnotationProperties, // creates a line annotation
+ std::string>; // creates an annotation whose type and properties are sourced from a style layer
ShapeAnnotation(const AnnotationSegments& segments_, const Properties& properties_)
: segments(segments_), properties(properties_) {