summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRoman Chichina <webmustang.s@gmail.com>2017-04-20 08:24:44 +0000
committerKonstantin Käfer <mail@kkaefer.com>2017-05-15 18:55:47 +0200
commitf2ad940c39e956f074da71bd142a58a052029b89 (patch)
tree62d0a492f1bfa8cf8735025d17f296b2d13b4dbf /bin
parent244fdaa4053994bd1ad1eaec0b54894bf1fcc4ce (diff)
downloadqtlocation-mapboxgl-f2ad940c39e956f074da71bd142a58a052029b89.tar.gz
[core] mbgl-render: allow scale factor to be floating point number
Diffstat (limited to 'bin')
-rw-r--r--bin/render.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/render.cpp b/bin/render.cpp
index 43b3c57a8d..82d851d015 100644
--- a/bin/render.cpp
+++ b/bin/render.cpp
@@ -27,8 +27,8 @@ int main(int argc, char *argv[]) {
double zoom = 0;
double bearing = 0;
double pitch = 0;
+ double pixelRatio = 1;
- uint32_t pixelRatio = 1;
uint32_t width = 512;
uint32_t height = 512;
static std::string output = "out.png";
@@ -84,7 +84,8 @@ int main(int argc, char *argv[]) {
HeadlessBackend backend;
BackendScope scope { backend };
- OffscreenView view(backend.getContext(), { width * pixelRatio, height * pixelRatio });
+ OffscreenView view(backend.getContext(), { static_cast<uint32_t>(width * pixelRatio),
+ static_cast<uint32_t>(height * pixelRatio) });
ThreadPool threadPool(4);
Map map(backend, mbgl::Size { width, height }, pixelRatio, fileSource, threadPool, MapMode::Still);