From 8985b1311b7d00cf761752bd9291566325ae207a Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 26 May 2016 16:35:55 -0700 Subject: [core] Use geometry.hpp types for shape annotations --- include/mbgl/annotation/shape_annotation.hpp | 11 ++++------- include/mbgl/platform/default/glfw_view.hpp | 4 +++- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'include/mbgl') diff --git a/include/mbgl/annotation/shape_annotation.hpp b/include/mbgl/annotation/shape_annotation.hpp index c5d4c42d87..7dca1ec134 100644 --- a/include/mbgl/annotation/shape_annotation.hpp +++ b/include/mbgl/annotation/shape_annotation.hpp @@ -3,14 +3,11 @@ #include #include -#include +#include #include namespace mbgl { -using AnnotationSegment = std::vector; -using AnnotationSegments = std::vector; - struct FillAnnotationProperties { float opacity = 1; Color color = {{ 0, 0, 0, 1 }}; @@ -30,10 +27,10 @@ public: 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_) {} + ShapeAnnotation(const Geometry& geometry_, const Properties& properties_) + : geometry(geometry_), properties(properties_) {} - const AnnotationSegments segments; + const Geometry geometry; const Properties properties; }; diff --git a/include/mbgl/platform/default/glfw_view.hpp b/include/mbgl/platform/default/glfw_view.hpp index b5931e6262..b3b6116ad7 100644 --- a/include/mbgl/platform/default/glfw_view.hpp +++ b/include/mbgl/platform/default/glfw_view.hpp @@ -3,6 +3,7 @@ #include #include #include +#include #ifdef MBGL_USE_GLES2 #define GLFW_INCLUDE_ES2 @@ -43,7 +44,8 @@ public: void report(float duration); private: - mbgl::LatLng makeRandomPoint() const; + mbgl::LatLng makeRandomLatLng() const; + mbgl::Point makeRandomPoint() const; static std::shared_ptr makeSpriteImage(int width, int height, float pixelRatio); -- cgit v1.2.1