diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-12 16:16:21 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-13 11:57:09 +0300 |
commit | c670b08ecb431b1bfd02da748de3d9fa16a757ec (patch) | |
tree | b1c19eab6e4b895018df67da4cd5a61e75b431f2 /include/mbgl/annotation | |
parent | a73c81cc55671c8f3f5916c310353a22d6a6f231 (diff) | |
download | qtlocation-mapboxgl-c670b08ecb431b1bfd02da748de3d9fa16a757ec.tar.gz |
[core] Use PropertyValue<T> for Annotation line/fill
Diffstat (limited to 'include/mbgl/annotation')
-rw-r--r-- | include/mbgl/annotation/annotation.hpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/mbgl/annotation/annotation.hpp b/include/mbgl/annotation/annotation.hpp index e8ac9a2fb7..a72c65b8c4 100644 --- a/include/mbgl/annotation/annotation.hpp +++ b/include/mbgl/annotation/annotation.hpp @@ -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. |