From f85f3acd7878f49f0878644905ca27ceb7bc0775 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 26 Aug 2014 09:23:43 +0200 Subject: Document loading of high resolution versions of images. Task-number: QTBUG-38858 Change-Id: I87ee18b66e137f5f5c01d77910f1a7f256b85e18 Reviewed-by: Alessandro Portale --- src/gui/image/qimage.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gui/image/qimage.cpp') diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 16696f611d..c3b4b1444a 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -1391,14 +1391,14 @@ QVector QImage::colorTable() const /*! Returns the device pixel ratio for the image. This is the - ratio between image pixels and device-independent pixels. + ratio between \e{device pixels} and \e{device independent pixels}. Use this function when calculating layout geometry based on the image size: QSize layoutSize = image.size() / image.devicePixelRatio() The default value is 1.0. - \sa setDevicePixelRatio() + \sa setDevicePixelRatio(), QImageReader */ qreal QImage::devicePixelRatio() const { @@ -1423,7 +1423,8 @@ qreal QImage::devicePixelRatio() const image size will take the ratio into account: QSize layoutSize = image.size() / image.devicePixelRatio() The net effect of this is that the image is displayed as - high-dpi image rather than a large image. + high-DPI image rather than a large image + (see \l{Drawing High Resolution Versions of Pixmaps and Images}). \sa devicePixelRatio() */ -- cgit v1.2.3