summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-08-10 23:01:14 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-08-10 23:01:14 (GMT)
commit2b9be8a7e00405626664dc9d21cd59e236b899a8 (patch)
treece8a8c6a9bef91f4aeecce27629adb50d09089e4 /src/declarative
parente3bb214199381bedf058fa797b514abc95142856 (diff)
downloadQt-2b9be8a7e00405626664dc9d21cd59e236b899a8.zip
Qt-2b9be8a7e00405626664dc9d21cd59e236b899a8.tar.gz
Qt-2b9be8a7e00405626664dc9d21cd59e236b899a8.tar.bz2
Clearer name for two PreserveAspect modes.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/fx/qfximage.cpp9
-rw-r--r--src/declarative/fx/qfximage.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp
index 985ddec..ec3fdab 100644
--- a/src/declarative/fx/qfximage.cpp
+++ b/src/declarative/fx/qfximage.cpp
@@ -176,14 +176,15 @@ void QFxImage::setPixmap(const QPixmap &pix)
\list
\o Stretch - the image is scaled to fit
- \o PreserveAspect - the image is scaled uniformly to fit
- \o PreserveAspectFill - the image is scaled uniformly to fill
+ \o PreserveAspectFit - the image is scaled uniformly to fit without cropping
+ \o PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary
\o Tile - the image is duplicated horizontally and vertically
\o TileVertically - the image is stretched horizontally and tiled vertically
\o TileHorizontally - the image is stretched vertically and tiled horizontally
\endlist
\image declarative-image_fillMode.gif
+ \sa examples/declarative/fillmode
\sa examples/declarative/aspectratio
*/
QFxImage::FillMode QFxImage::fillMode() const
@@ -302,7 +303,7 @@ void QFxImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
QTransform scale;
- if (d->fillMode == PreserveAspect) {
+ if (d->fillMode == PreserveAspectFit) {
if (widthScale < heightScale) {
heightScale = widthScale;
scale.translate(0, (height() - heightScale * pix.height()) / 2);
@@ -310,7 +311,7 @@ void QFxImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
widthScale = heightScale;
scale.translate((width() - widthScale * pix.width()) / 2, 0);
}
- } else if (d->fillMode == PreserveAspectFill) {
+ } else if (d->fillMode == PreserveAspectCrop) {
if (widthScale < heightScale) {
widthScale = heightScale;
scale.translate((width() - widthScale * pix.width()) / 2, 0);
diff --git a/src/declarative/fx/qfximage.h b/src/declarative/fx/qfximage.h
index 91b10ef..c8e21ea 100644
--- a/src/declarative/fx/qfximage.h
+++ b/src/declarative/fx/qfximage.h
@@ -63,7 +63,7 @@ public:
QFxImage(QFxItem *parent=0);
~QFxImage();
- enum FillMode { Stretch, PreserveAspect, PreserveAspectFill, Tile, TileVertically, TileHorizontally };
+ enum FillMode { Stretch, PreserveAspectFit, PreserveAspectCrop, Tile, TileVertically, TileHorizontally };
FillMode fillMode() const;
void setFillMode(FillMode);
b775ab54f565383c95200d16dc42d94fe17'>plain -rw-r--r--Android.cmake355logstatsplain -rw-r--r--BSDOS.cmake29logstatsplain -rw-r--r--BeOS.cmake404logstatsplain -rw-r--r--BlueGeneL.cmake1864logstatsplain -rw-r--r--BlueGeneP-base.cmake5777logstatsplain -rw-r--r--BlueGeneP-dynamic-GNU-C.cmake691logstatsplain -rw-r--r--BlueGeneP-dynamic-GNU-CXX.cmake693logstatsplain -rw-r--r--BlueGeneP-dynamic-GNU-Fortran.cmake697logstatsplain -rw-r--r--BlueGeneP-dynamic-XL-C.cmake690logstatsplain -rw-r--r--BlueGeneP-dynamic-XL-CXX.cmake692logstatsplain -rw-r--r--BlueGeneP-dynamic-XL-Fortran.cmake696logstatsplain -rw-r--r--BlueGeneP-dynamic.cmake833logstatsplain -rw-r--r--BlueGeneP-static-GNU-C.cmake690logstatsplain -rw-r--r--BlueGeneP-static-GNU-CXX.cmake692logstatsplain -rw-r--r--BlueGeneP-static-GNU-Fortran.cmake696logstatsplain -rw-r--r--BlueGeneP-static-XL-C.cmake689logstatsplain -rw-r--r--BlueGeneP-static-XL-CXX.cmake691logstatsplain -rw-r--r--BlueGeneP-static-XL-Fortran.cmake695logstatsplain -rw-r--r--BlueGeneP-static.cmake828logstatsplain -rw-r--r--CYGWIN-CXX.cmake248logstatsplain -rw-r--r--CYGWIN-GNU-C.cmake54logstatsplain -rw-r--r--CYGWIN-GNU-CXX.cmake56logstatsplain -rw-r--r--CYGWIN-GNU-Fortran.cmake60logstatsplain -rw-r--r--CYGWIN-GNU.cmake2864logstatsplain -rw-r--r--CYGWIN-windres.cmake95logstatsplain -rw-r--r--CYGWIN.cmake2566logstatsplain -rw-r--r--Catamount.cmake1033logstatsplain -rw-r--r--Darwin-Absoft-Fortran.cmake866logstatsplain -rw-r--r--Darwin-AppleClang-C.cmake33logstatsplain -rw-r--r--Darwin-AppleClang-CXX.cmake35logstatsplain -rw-r--r--Darwin-CXX.cmake248logstatsplain -rw-r--r--Darwin-Clang-C.cmake58logstatsplain -rw-r--r--Darwin-Clang-CXX.cmake60logstatsplain -rw-r--r--Darwin-Clang.cmake1332logstatsplain -rw-r--r--Darwin-GNU-C.cmake128logstatsplain -rw-r--r--Darwin-GNU-CXX.cmake134logstatsplain -rw-r--r--Darwin-GNU-Fortran.cmake859logstatsplain