diff options
author | Roman Chichina <webmustang.s@gmail.com> | 2017-04-20 08:24:44 +0000 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-05-15 18:55:47 +0200 |
commit | f2ad940c39e956f074da71bd142a58a052029b89 (patch) | |
tree | 62d0a492f1bfa8cf8735025d17f296b2d13b4dbf | |
parent | 244fdaa4053994bd1ad1eaec0b54894bf1fcc4ce (diff) | |
download | qtlocation-mapboxgl-f2ad940c39e956f074da71bd142a58a052029b89.tar.gz |
[core] mbgl-render: allow scale factor to be floating point number
-rw-r--r-- | bin/render.cpp | 5 |
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); |