diff options
author | Charles Yin <charles.yin@nokia.com> | 2011-08-24 14:49:07 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-08-24 06:49:43 +0200 |
commit | 5a11bd436e5762610891d79be71c58af09f807ea (patch) | |
tree | 064dd0a87563ad8b0f544b14483a5da89414ae89 /examples/declarative/canvas/svgpath/tiger.qml | |
parent | 0d572fc7d251691a34fe5b99c60868835409047e (diff) |
disable the canvas svgpath example temporarily.
Change-Id: I368acd65e9d352ecc04f4f7aaa3efc43d4530530
Reviewed-on: http://codereview.qt.nokia.com/3440
Reviewed-by: Charles Yin <charles.yin@nokia.com>
Diffstat (limited to 'examples/declarative/canvas/svgpath/tiger.qml')
-rw-r--r-- | examples/declarative/canvas/svgpath/tiger.qml | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/examples/declarative/canvas/svgpath/tiger.qml b/examples/declarative/canvas/svgpath/tiger.qml deleted file mode 100644 index 77161e7c46..0000000000 --- a/examples/declarative/canvas/svgpath/tiger.qml +++ /dev/null @@ -1,85 +0,0 @@ -import QtQuick 2.0 -import "tiger.js" as Tiger - -Canvas { - id:canvas - width:1900 - height:1100 - fillColor:"#000000" - focus:true - renderTarget:PaintedItem.FramebufferObject - property int frame:0 - property date paintingTime - Component.onCompleted: { - canvas.frame++; - canvas.requestPaint(); - } - onPainted: { - var endPaintingTime = new Date; - console.log("painting time:" + (endPaintingTime.valueOf() - canvas.paintingTime.valueOf())); - canvas.frame++; - if (canvas.frame > Tiger.tiger.length) { -// canvas.frame = 0; - canvas.frame = Tiger.tiger.length; - } else { - canvas.requestPaint(); - } - } - onPaint:{ - canvas.paintingTime = new Date(); - Tiger.draw(context, canvas.frame); - } - Keys.onPressed : { - if (event.key == Qt.Key_Plus) { - canvas.contentsScale *= 1.5; - } - if (event.key == Qt.Key_Minus) { - canvas.contentsScale *= 0.7; - } - if (event.key == Qt.Key_Left) { - canvas.canvasX +=60; - } - if (event.key == Qt.Key_Right) { - canvas.canvasX -= 60; - } - if (event.key == Qt.Key_Up) { - canvas.canvasY += 40; - } - if (event.key == Qt.Key_Down) { - canvas.canvasY -= 40; - } - - canvas.requestPaint(); - } - Rectangle { - anchors.bottom : parent.bottom - color: "white" - opacity:0.7 - height:50 - width:canvas.width - radius:4 - Text { - anchors.bottom : parent.bottom - font.pixelSize : 30 - text: "drawing path:" + canvas.frame + "/" + Tiger.tiger.length - + " moving to:(" + canvas.canvasX + "," + canvas.canvasY + ")" - + " scale:" + canvas.contentsScale; - } - } - - MouseArea { - id:mouseArea - anchors.fill:parent - property real pressedX; - property real pressedY; - onPressed: { - pressedX = mouseX; - pressedY = mouseY; - } - onPositionChanged : { - canvas.canvasX = mouseX - pressedX; - canvas.canvasY = mouseY - pressedY; - canvas.requestPaint(); - } - } -} |