From c13dd32242b559b00b0b716dc524ed5161c2b147 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Wed, 11 May 2016 14:10:17 +0300 Subject: [core] Added Viewport mode Satisfies embedding platforms that requires the viewport coordinate systems to be set according to its standards e.g. viewport mirrored vertically. --- include/mbgl/map/map.hpp | 9 +++++++-- include/mbgl/map/mode.hpp | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 3200484ec1..1042d97574 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -34,7 +34,8 @@ public: explicit Map(View&, FileSource&, MapMode mapMode = MapMode::Continuous, GLContextMode contextMode = GLContextMode::Unique, - ConstrainMode constrainMode = ConstrainMode::HeightOnly); + ConstrainMode constrainMode = ConstrainMode::HeightOnly, + ViewportMode viewportMode = ViewportMode::Default); ~Map(); // Register a callback that will get called (on the render thread) when all resources have @@ -117,11 +118,15 @@ public: // North Orientation void setNorthOrientation(NorthOrientation); NorthOrientation getNorthOrientation() const; - + // Constrain mode void setConstrainMode(ConstrainMode); ConstrainMode getConstrainMode() const; + // Viewport mode + void setViewportMode(ViewportMode); + ViewportMode getViewportMode() const; + // Size uint16_t getWidth() const; uint16_t getHeight() const; diff --git a/include/mbgl/map/mode.hpp b/include/mbgl/map/mode.hpp index 7fd1a7f522..9302e36056 100644 --- a/include/mbgl/map/mode.hpp +++ b/include/mbgl/map/mode.hpp @@ -29,6 +29,13 @@ enum class ConstrainMode : EnumType { WidthAndHeight, }; +// Satisfies embedding platforms that requires the viewport coordinate systems +// to be set according to its standards. +enum class ViewportMode : EnumType { + Default, + FlippedY, +}; + enum class MapDebugOptions : EnumType { NoDebug = 0, TileBorders = 1 << 1, -- cgit v1.2.1