summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2023-04-18 10:23:43 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-04-20 18:01:05 +0000
commit41a8f0e47eb220b378893ab899b898be80572895 (patch)
treedb72183ae9879906101e0ac50e49312e64e15507 /src
parente78db8accb725ed6d49fe25cf17d5ebe576a0d81 (diff)
downloadqtbase-41a8f0e47eb220b378893ab899b898be80572895.tar.gz
Refix printing of dpr>1 images on Windows
This modifies 9e453dacc3855bafd3d7b692d76699c3bf07b9c6 to make sure that QPainter uses the adjusted DPR when doing the tile copying. Fixes: QTBUG-99990 Change-Id: Id9c7b5576d5036e20bb399f3c8b82d4a467dc70f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit daa77824b3fca656db14663c798370e221610c34) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/printsupport/platform/windows/qprintengine_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/printsupport/platform/windows/qprintengine_win.cpp b/src/printsupport/platform/windows/qprintengine_win.cpp
index 516ed0fc94..681f58903e 100644
--- a/src/printsupport/platform/windows/qprintengine_win.cpp
+++ b/src/printsupport/platform/windows/qprintengine_win.cpp
@@ -561,9 +561,9 @@ void QWin32PrintEngine::drawPixmap(const QRectF &targetRect,
QImage img(QSize(imgw, imgh), QImage::Format_RGB32);
+ img.setDevicePixelRatio(pixmap.devicePixelRatio());
img.fill(Qt::white);
QPainter painter(&img);
- img.setDevicePixelRatio(pixmap.devicePixelRatio());
painter.drawPixmap(0,0, pixmap, tileSize * x, tileSize * y, imgw, imgh);
QPixmap p = QPixmap::fromImage(img);