diff options
author | Charles Yin <yinyunqiao@gmail.com> | 2012-03-28 00:06:28 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-30 05:18:32 +0200 |
commit | 200f783745b571725f899f08c34d1155be632523 (patch) | |
tree | 146c481f5ad5bbb900acf9fbf9251a68d633c266 /tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml | |
parent | 652fa5b7a44d2d7bb38126b4659e7347caa5d4a8 (diff) |
Fix context2d transform issues
After calling transform related methods, the current path should be transformed with the same method but in reversal mode.
So that during painting, the painter will apply the CTM to this path again, otherwise path will be transformed twice.
Change-Id: I7e12bdff82dabb408f47152ba07b608872d4093f
Task-number: QTBUG-24988
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml')
-rw-r--r-- | tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml b/tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml index 84bfc1a8db..188d538d29 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml @@ -118,7 +118,7 @@ Canvas { ctx.beginPath(); ctx.arcTo(100, 50, 200, 50, 0.1); ctx.stroke(); - //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255)); + verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255)); ctx.reset(); ctx.fillStyle = '#f00'; @@ -152,8 +152,6 @@ Canvas { var ctx = canvas.getContext('2d'); ctx.reset(); - skip("FIXME"); - ctx.moveTo(0, 0); ctx.lineTo(100, 0); ctx.arcTo(Infinity, 50, 0, 50, 0); @@ -221,7 +219,7 @@ Canvas { ctx.lineTo(-1000, 0); ctx.fill(); - skip("FIXME"); + //FIXME //verify(Helper.comparePixel(ctx, 0,0, 0,255,0,255)); //verify(Helper.comparePixel(ctx, 50,0, 0,255,0,255)); //verify(Helper.comparePixel(ctx, 99,0, 0,255,0,255)); @@ -332,7 +330,8 @@ Canvas { ctx.arcTo(200, 25, 200, 50, 10); ctx.stroke(); - //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255)); + //FIXME + //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255)); //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255)); //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255)); //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255)); @@ -354,16 +353,15 @@ Canvas { ctx.lineTo(-100, 0); ctx.fill(); - skip("FIXME"); - //verify(Helper.comparePixel(ctx, 0,0, 0,255,0,255)); - //verify(Helper.comparePixel(ctx, 50,0, 0,255,0,255)); - //verify(Helper.comparePixel(ctx, 99,0, 0,255,0,255)); - //verify(Helper.comparePixel(ctx, 0,25, 0,255,0,255)); - //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255)); - //verify(Helper.comparePixel(ctx, 99,25, 0,255,0,255)); - //verify(Helper.comparePixel(ctx, 0,49, 0,255,0,255)); - //verify(Helper.comparePixel(ctx, 50,49, 0,255,0,255)); - //verify(Helper.comparePixel(ctx, 99,49, 0,255,0,255)); + verify(Helper.comparePixel(ctx, 0,0, 0,255,0,255)); + verify(Helper.comparePixel(ctx, 50,0, 0,255,0,255)); + verify(Helper.comparePixel(ctx, 99,0, 0,255,0,255)); + verify(Helper.comparePixel(ctx, 0,25, 0,255,0,255)); + verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255)); + verify(Helper.comparePixel(ctx, 99,25, 0,255,0,255)); + verify(Helper.comparePixel(ctx, 0,49, 0,255,0,255)); + verify(Helper.comparePixel(ctx, 50,49, 0,255,0,255)); + verify(Helper.comparePixel(ctx, 99,49, 0,255,0,255)); } function test_zero() { var ctx = canvas.getContext('2d'); |