QMacCGContext: Take paint device pixel ratio into account

This seems to have been omitted in c52bb03090.

Change-Id: If8cde889af75934c85d9b21bd22095b7e5a4bf32
Task-number: QTBUG-57894
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
Gabriel de Dietrich 2017-01-03 16:53:35 -08:00 committed by Jani Heikkinen
parent 39e80062d0
commit 86abf43122

View File

@ -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);
}