summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-05-11 14:10:17 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-05-11 15:48:51 +0300
commitc13dd32242b559b00b0b716dc524ed5161c2b147 (patch)
tree96c83728499b7317c8a6d087d38016b9a2e55644 /include
parent659c2568ece4153f34d2880e53f54351f51b0917 (diff)
downloadqtlocation-mapboxgl-c13dd32242b559b00b0b716dc524ed5161c2b147.tar.gz
[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.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/map.hpp9
-rw-r--r--include/mbgl/map/mode.hpp7
2 files changed, 14 insertions, 2 deletions
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,