macOS: Take DPR into account when creating CGContexts for a QPixmap
Missing logic when refactoring image manipulation methods into QtGui
in c52bb03090.
Task-number: QTBUG-57723
Change-Id: I7b55d4451d35faf5fd794daa0b80acbd712f30cd
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
bb10
parent
b9edbb5d54
commit
8533c94a24
|
|
@ -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());
|
||||
qreal devicePixelRatio = paintDevice->devicePixelRatioF();
|
||||
CGContextScaleCTM(context, devicePixelRatio, devicePixelRatio);
|
||||
CGContextScaleCTM(context, 1, -1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue