diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2018-08-30 17:26:04 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2018-10-19 12:05:16 +0200 |
commit | b94be6e68f666410852aebd638782601162809d6 (patch) | |
tree | 91774c156316838c28e49ba8b6a167749c974591 /platform/default | |
parent | 98c36fc06edb99b2db20d474c4c3ec6bf51e219d (diff) | |
download | qtlocation-mapboxgl-b94be6e68f666410852aebd638782601162809d6.tar.gz |
[core] Add TransformState::getCameraOptions()
Diffstat (limited to 'platform/default')
-rw-r--r-- | platform/default/mbgl/gl/headless_frontend.cpp | 8 | ||||
-rw-r--r-- | platform/default/mbgl/gl/headless_frontend.hpp | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/platform/default/mbgl/gl/headless_frontend.cpp b/platform/default/mbgl/gl/headless_frontend.cpp index 4263d2b148..c87a2796c9 100644 --- a/platform/default/mbgl/gl/headless_frontend.cpp +++ b/platform/default/mbgl/gl/headless_frontend.cpp @@ -55,6 +55,14 @@ RendererBackend* HeadlessFrontend::getBackend() { return &backend; } +CameraOptions HeadlessFrontend::getCameraOptions() { + if (updateParameters) + return RendererState::getCameraOptions(*updateParameters); + + static CameraOptions nullCamera; + return nullCamera; +} + void HeadlessFrontend::setSize(Size size_) { if (size != size_) { size = size_; diff --git a/platform/default/mbgl/gl/headless_frontend.hpp b/platform/default/mbgl/gl/headless_frontend.hpp index 8ae617d37b..29ab30c93d 100644 --- a/platform/default/mbgl/gl/headless_frontend.hpp +++ b/platform/default/mbgl/gl/headless_frontend.hpp @@ -1,5 +1,6 @@ #pragma once +#include <mbgl/map/camera.hpp> #include <mbgl/renderer/mode.hpp> #include <mbgl/renderer/renderer_frontend.hpp> #include <mbgl/gl/headless_backend.hpp> @@ -32,6 +33,7 @@ public: Renderer* getRenderer(); RendererBackend* getBackend(); + CameraOptions getCameraOptions(); PremultipliedImage readStillImage(); PremultipliedImage render(Map&); |