aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/canvas/pixels/pixels.qml
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2012-02-09 15:46:09 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-10 07:24:29 +0100
commit66f740c5e7ea74e00808d8f1b73570726eeda5a0 (patch)
treea25f2eb3a3c38a19b31c48f1c281d80bf5f0b6a5 /examples/declarative/canvas/pixels/pixels.qml
parentb06f7aa36c9c80211e662b30d248a1e5192b0460 (diff)
Refactor Canvas rendering paths.
Refactor Canvas rendering paths to enable different drawing contexts. Change-Id: If0e00a14baa673fca6b999a787b4e89885bb1e51 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Diffstat (limited to 'examples/declarative/canvas/pixels/pixels.qml')
-rw-r--r--examples/declarative/canvas/pixels/pixels.qml14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/declarative/canvas/pixels/pixels.qml b/examples/declarative/canvas/pixels/pixels.qml
index 6bd0525f6a..bb67eae965 100644
--- a/examples/declarative/canvas/pixels/pixels.qml
+++ b/examples/declarative/canvas/pixels/pixels.qml
@@ -56,7 +56,7 @@ Item {
height:360
smooth:true
renderTarget:Canvas.FramebufferObject
- renderInThread:false
+ renderStrategy: Canvas.Cooperative
property string image :"../contents/qt-logo.png"
Component.onCompleted:loadImage(image);
onImageLoaded:requestPaint();
@@ -66,12 +66,12 @@ Item {
if (canvas.isImageLoaded(image)) {
var pixels = ctx.createImageData(image);
//pixels.mirror();
- pixels.filter(Canvas.GrayScale);
- //pixels.filter(Canvas.Threshold, 100); //default 127
- //pixels.filter(Canvas.Blur, 20); //default 10
- //pixels.filter(Canvas.Opaque);
- //pixels.filter(Canvas.Invert);
- //pixels.filter(Canvas.Convolute, [0,-1,0,
+ pixels.filter(ctx.GrayScale);
+ //pixels.filter(ctx.Threshold, 100); //default 127
+ //pixels.filter(ctx.Blur, 20); //default 10
+ //pixels.filter(ctx.Opaque);
+ //pixels.filter(ctx.Invert);
+ //pixels.filter(ctx.Convolute, [0,-1,0,
// -1,5,-1,
// 0,-1,0]);
//ctx.putImageData(pixels, 0, 0, canvas.width, canvas.height);