diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-03-26 04:33:04 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-03-26 04:36:50 (GMT) |
commit | 09a40e13174b9f34007ce9fbd98e06b4e48c1954 (patch) | |
tree | 8f7735640e87e154d434f80130ab8812e3f4e58b /examples/declarative | |
parent | c2928bfdb467d7c54a97a71b6a1169db02e623fe (diff) | |
download | Qt-09a40e13174b9f34007ce9fbd98e06b4e48c1954.zip Qt-09a40e13174b9f34007ce9fbd98e06b4e48c1954.tar.gz Qt-09a40e13174b9f34007ce9fbd98e06b4e48c1954.tar.bz2 |
Control of image rendered size (esp. SVG).
Add Translate transform.
Image::sourceWidth and Image::sourceHeight read/write properties.
Task-number: QTBUG-8984
Diffstat (limited to 'examples/declarative')
-rw-r--r-- | examples/declarative/images/content/lemonade.jpg | bin | 0 -> 6645 bytes | |||
-rw-r--r-- | examples/declarative/images/images.qml | 70 |
2 files changed, 70 insertions, 0 deletions
diff --git a/examples/declarative/images/content/lemonade.jpg b/examples/declarative/images/content/lemonade.jpg Binary files differnew file mode 100644 index 0000000..db445c9 --- /dev/null +++ b/examples/declarative/images/content/lemonade.jpg diff --git a/examples/declarative/images/images.qml b/examples/declarative/images/images.qml new file mode 100644 index 0000000..82848df --- /dev/null +++ b/examples/declarative/images/images.qml @@ -0,0 +1,70 @@ +import Qt 4.6 + +Rectangle { + color: "white" + width: grid.width + 50 + height: grid.height + 50 + + Grid { + x: 25; y: 25 + id: grid + columns: 3 + + Image { + source: "content/lemonade.jpg" + } + + Image { + sourceWidth: 50 + sourceHeight: 50 + source: "content/lemonade.jpg" + } + + Image { + sourceWidth: 50 + sourceHeight: 50 + smooth: true + source: "content/lemonade.jpg" + } + + Image { + scale: 1/3 + source: "content/lemonade.jpg" + } + + Image { + scale: 1/3 + sourceWidth: 50 + sourceHeight: 50 + source: "content/lemonade.jpg" + } + + Image { + scale: 1/3 + sourceWidth: 50 + sourceHeight: 50 + smooth: true + source: "content/lemonade.jpg" + } + + Image { + width: 50; height: 50; transform: Translate { x: 50 } + source: "content/lemonade.jpg" + } + + Image { + width: 50; height: 50; transform: Translate { x: 50 } + sourceWidth: 50 + sourceHeight: 50 + source: "content/lemonade.jpg" + } + + Image { + width: 50; height: 50; transform: Translate { x: 50 } + sourceWidth: 50 + sourceHeight: 50 + smooth: true + source: "content/lemonade.jpg" + } + } +} |