diff options
author | 2024-05-10 00:04:04 -0400 | |
---|---|---|
committer | 2024-05-10 00:04:04 -0400 | |
commit | 58a7d8c9cf50d4b2a9ae321684ca9d4ce4504260 (patch) | |
tree | 7cc6d38194ce165cf9f8ca0bd13577c2f383fb59 /mapman/src/utils.cpp | |
parent | c2b90e8c89d6477cf52a6b38ca63cb2f15955935 (diff) | |
download | meteor-trashy-addon-58a7d8c9cf50d4b2a9ae321684ca9d4ce4504260.tar.xz |
Disable automatic hidpi scaling on maps. Add zoom option.
Diffstat (limited to 'mapman/src/utils.cpp')
-rw-r--r-- | mapman/src/utils.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mapman/src/utils.cpp b/mapman/src/utils.cpp index f01d946..e6f658c 100644 --- a/mapman/src/utils.cpp +++ b/mapman/src/utils.cpp @@ -21,9 +21,10 @@ rgb_t modify_color(rgb_t c, uint8_t variant) QColor rgb2qcolor(rgb_t c) {return QColor(c.r, c.g, c.b);} -QPixmap pixmap_of_map_data(const std::array<uint8_t, 128 * 128> &map_data) +QPixmap pixmap_of_map_data(const std::array<uint8_t, 128 * 128> &map_data, double scaling) { QImage ret(128, 128, QImage::Format_ARGB32); + ret.setDevicePixelRatio(scaling); for (size_t i = 0; i < 128; ++i) for (size_t j = 0; j < 128; ++j) { |