From f2ad940c39e956f074da71bd142a58a052029b89 Mon Sep 17 00:00:00 2001 From: Roman Chichina Date: Thu, 20 Apr 2017 08:24:44 +0000 Subject: [core] mbgl-render: allow scale factor to be floating point number --- bin/render.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin') 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(width * pixelRatio), + static_cast(height * pixelRatio) }); ThreadPool threadPool(4); Map map(backend, mbgl::Size { width, height }, pixelRatio, fileSource, threadPool, MapMode::Still); -- cgit v1.2.1