aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/canvas/tiger/tiger.qml
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2012-04-20 21:58:59 +1000
committerQt by Nokia <qt-info@nokia.com>2012-04-26 04:53:08 +0200
commit0ac61552a47fedb0d3dfb4e690b10e998aaaaf92 (patch)
tree1e2f88b5d96841f3b5dda878a0e5ab9b76ed2b3f /examples/quick/canvas/tiger/tiger.qml
parenta5336a0577b715edf49bef3794c6b1a8fa225a73 (diff)
Expound on canvas example documentation
Change-Id: I5bf82697dcbadaa9dc58e11ee22b2ab8c1a28852 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Diffstat (limited to 'examples/quick/canvas/tiger/tiger.qml')
-rw-r--r--examples/quick/canvas/tiger/tiger.qml29
1 files changed, 15 insertions, 14 deletions
diff --git a/examples/quick/canvas/tiger/tiger.qml b/examples/quick/canvas/tiger/tiger.qml
index 6b8e0035a2..620ba6a715 100644
--- a/examples/quick/canvas/tiger/tiger.qml
+++ b/examples/quick/canvas/tiger/tiger.qml
@@ -92,26 +92,27 @@ Item {
ctx.strokeStyle = Qt.rgba(.3, .3, .3,1);
ctx.lineWidth = 1;
-
+ //! [0]
for (var i = 0; i < canvas.frame && i < Tiger.tiger.length; i++) {
- if (Tiger.tiger[i].width != undefined)
- ctx.lineWidth = Tiger.tiger[i].width;
+ if (Tiger.tiger[i].width != undefined)
+ ctx.lineWidth = Tiger.tiger[i].width;
- if (Tiger.tiger[i].path != undefined)
- ctx.path = Tiger.tiger[i].path;
+ if (Tiger.tiger[i].path != undefined)
+ ctx.path = Tiger.tiger[i].path;
- if (Tiger.tiger[i].fill != undefined) {
- ctx.fillStyle = Tiger.tiger[i].fill;
- ctx.fill();
- }
+ if (Tiger.tiger[i].fill != undefined) {
+ ctx.fillStyle = Tiger.tiger[i].fill;
+ ctx.fill();
+ }
- if (Tiger.tiger[i].stroke != undefined) {
- ctx.strokeStyle = Tiger.tiger[i].stroke;
- ctx.stroke();
+ if (Tiger.tiger[i].stroke != undefined) {
+ ctx.strokeStyle = Tiger.tiger[i].stroke;
+ ctx.stroke();
+ }
}
- }
+ //! [0]
ctx.restore();
- }
+ }
}
Rectangle {
id:controls