summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-01-03 16:53:35 -0800
committerJani Heikkinen <jani.heikkinen@qt.io>2017-01-04 08:32:52 +0000
commit86abf43122c0b41371d1f6eee7311079ed7cf2bb (patch)
tree49c046ba6747508454c3e1ddcd7a9b371b763978 /src/gui/painting
parent39e80062d0cf0c25b456bd89be827e50a6077efa (diff)
QMacCGContext: Take paint device pixel ratio into account
This seems to have been omitted in c52bb0309071bed9e040c79d87f764bac6a396b8. Change-Id: If8cde889af75934c85d9b21bd22095b7e5a4bf32 Task-number: QTBUG-57894 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qcoregraphics.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qcoregraphics.mm b/src/gui/painting/qcoregraphics.mm
index 466b18d59b..803328c10f 100644
--- a/src/gui/painting/qcoregraphics.mm
+++ b/src/gui/painting/qcoregraphics.mm
@@ -495,6 +495,8 @@ QMacCGContext::QMacCGContext(QPaintDevice *paintDevice) : context(0)
context = CGBitmapContextCreate(image->bits(), image->width(), image->height(),
8, image->bytesPerLine(), colorspace, flags);
CGContextTranslateCTM(context, 0, image->height());
+ const qreal devicePixelRatio = paintDevice->devicePixelRatioF();
+ CGContextScaleCTM(context, devicePixelRatio, devicePixelRatio);
CGContextScaleCTM(context, 1, -1);
}