From 7ec765b1d10d26de2e13cb22364e45427b654d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 14 Apr 2015 20:01:15 +0200 Subject: Use qreal for devicePixelRatio everywhere QPaintDevice::devicePixelRatio() -> devicePixelRatioF() Implement PdmDevicePixelRatioScaled for QPaintDevice subclasses. Remove instances of casting to int. Change-Id: I6e769d21e889bf8f88aedc1c49b53fef20a6709c --- src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/platforms/direct2d') diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.cpp index fee9ad88fa..bc6590ef64 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.cpp +++ b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.cpp @@ -113,6 +113,9 @@ int QWindowsDirect2DPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) case QPaintDevice::PdmDevicePixelRatio: return 1; break; + case QPaintDevice::PdmDevicePixelRatioScaled: + return 1 * devicePixelRatioFScale; + break; case QPaintDevice::PdmWidthMM: case QPaintDevice::PdmHeightMM: return -1; -- cgit v1.2.3