summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeimage.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index 425976f..23a2350 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -266,6 +266,31 @@ qreal QDeclarativeImage::paintedHeight() const
filtering at the beginning of the animation and reenable it at the conclusion.
*/
+/*!
+ \qmlproperty QSize Image::sourceSize
+
+ This properties is the size of the loaded image, in pixels.
+
+ If you set this property explicitly, you can to control the storage
+ used by a loaded image. The image will be scaled down if its intrinsic size
+ is greater than this value.
+
+ Unlike setting the width and height properties, which merely scale the painting
+ of the image, this property affects the number of pixels stored.
+
+ \e{Changing this property dynamically will lead to the image source being reloaded,
+ potentially even from the network if it is not in the disk cache.}
+
+ If the source is an instrinsically scalable image (eg. SVG), this property
+ determines the size of the loaded image regardless of intrinsic size. You should
+ avoid changing this property dynamically - rendering an SVG is \e slow compared
+ to an image.
+
+ If the source is a non-scalable image (eg. JPEG), the loaded image will
+ be no greater than this property specifies. For some formats (currently only JPEG),
+ the whole image will never actually be loaded into memory.
+*/
+
void QDeclarativeImage::updatePaintedGeometry()
{
Q_D(QDeclarativeImage);