diff options
Diffstat (limited to 'src/gui/painting/qpaintdevice.qdoc')
-rw-r--r-- | src/gui/painting/qpaintdevice.qdoc | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintdevice.qdoc b/src/gui/painting/qpaintdevice.qdoc index 8db65af18e..ef5deb154d 100644 --- a/src/gui/painting/qpaintdevice.qdoc +++ b/src/gui/painting/qpaintdevice.qdoc @@ -118,7 +118,13 @@ values are 1 for normal-dpi displays and 2 for high-dpi "retina" displays. - \sa metric() + \value PdmDevicePixelRatioScaled The scaled device pixel ratio for the device. + This is identical to PdmDevicePixelRatio, except that the value is scaled by a + constant factor in order to support paint devices with fractional scale factors. + The constant scaling factor used is devicePixelRatioFScale(). This enum value + has been introduced in Qt 5.6. + + \sa metric(), devicePixelRatioF() */ /*! @@ -286,3 +292,24 @@ Common values are 1 for normal-dpi displays and 2 for high-dpi "retina" displays. */ + +/*! + \fn qreal QPaintDevice::devicePixelRatioF() const + + Returns the device pixel ratio for the device as a floating point number. + + \since 5.6 +*/ + +/*! + \fn qreal QPaintDevice::devicePixelRatioFScale() + + \internal + + Returns the scaling factor used for \c PdmDevicePixelRatioScaled. Classes + that are not QPaintDevice subclasses are implementing metric(), and need to + access this constant. Since it's a qreal, it cannot be an enum, and an inline + function is more efficient than a static member variable. + + \since 5.6 +*/ |