diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2010-09-19 12:46:33 +0200 |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2010-09-19 12:46:33 +0200 |
commit | 2c75fcdebe986ba1c193d319b3eb47cf34261b1e (patch) | |
tree | 0f14f00ea5be03ddaea32268518267cb35023c6f | |
parent | a66c253d8229fcd6236cba8e98428f23970e0ad0 (diff) |
Dont save images in example
-rw-r--r-- | examples/painting/painting.qml | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/painting/painting.qml b/examples/painting/painting.qml index a3aacdd..22ef041 100644 --- a/examples/painting/painting.qml +++ b/examples/painting/painting.qml @@ -39,7 +39,6 @@ Rectangle { anchors.fill: parent delegate: idelegate model: model - cacheBuffer: 20 } } @@ -62,10 +61,10 @@ Rectangle { onInit: { var ctx = getContext("2d"); // Here we copy contents from drawing and apply drop shaddow - var img = canvas.toImage(); + var img = image; ctx.shadowOffsetX = 1; ctx.shadowOffsetY = 1; - ctx.shadowBlur = 8; + ctx.shadowBlur = 14; ctx.shadowColor = "black"; ctx.drawImage(img, 25, 25, width-50, height-50); } @@ -108,9 +107,7 @@ Rectangle { MouseArea { anchors.fill:parent onClicked: { - var name = "canvas" + (++canvas.count) +".png"; - canvas.save(name); - model.append({src:name}); + model.append({image:canvas.toImage()}); view.currentIndex = model.count-1 } } |