diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-26 15:12:43 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-10 11:33:17 -0800 |
commit | 54e08b1f83504e12cbc19b08295d9f9ed5177ab5 (patch) | |
tree | 40513395d4d0ed2d9003ef30a708f21b2e83e5ab /include/mbgl/annotation | |
parent | a5625675890213f94de7632d4ef152ade627c9a5 (diff) | |
download | qtlocation-mapboxgl-54e08b1f83504e12cbc19b08295d9f9ed5177ab5.tar.gz |
[core] Eliminate use of ClassProperties for paint
Diffstat (limited to 'include/mbgl/annotation')
-rw-r--r-- | include/mbgl/annotation/shape_annotation.hpp | 20 |
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_) { |