diff options
Diffstat (limited to 'tests/auto/declarative/qquickcanvasitem/data/testhelper.js')
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/testhelper.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/auto/declarative/qquickcanvasitem/data/testhelper.js b/tests/auto/declarative/qquickcanvasitem/data/testhelper.js deleted file mode 100644 index bac0210e16..0000000000 --- a/tests/auto/declarative/qquickcanvasitem/data/testhelper.js +++ /dev/null @@ -1,18 +0,0 @@ -function comparePixel(ctx,x,y,r,g,b,a, d) -{ - var c = ctx.getImageData(x,y,1,1).data; - if (d === undefined) - d = 0; - r = Math.round(r); - g = Math.round(g); - b = Math.round(b); - a = Math.round(a); - - if (Math.abs(c[0]-r)>d || Math.abs(c[1]-g)>d || Math.abs(c[2]-b)>d || Math.abs(c[3]-a)>d) { - console.log('Pixel compare fail:\nactual :[' + c[0]+','+c[1]+','+c[2]+','+c[3] + ']\nexpected:['+r+','+g+','+b+','+a+'] +/- '+d); - return false; - } - return true; -} - - |