import QtQuick 2.0 CanvasTestCase { id:testCase name: "composite" function init_data() { return testData("2d"); } function test_clearRect(row) { var canvas = createCanvasObject(row); var ctx = canvas.getContext('2d'); ctx.reset(); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-atop'; ctx.clearRect(0, 0, 100, 50); comparePixel(ctx, 50,25, 0,0,0,0); } function test_clip(row) { var canvas = createCanvasObject(row); var ctx = canvas.getContext('2d'); var composites = [ {compsite:"copy"}, {compsite:"destination-atop"}, {compsite:"destination-in"}, {compsite:"destination-out"}, {compsite:"destination-over"}, // {compsite:"lighter"}, //qt doesn't support lighter {compsite:"source-atop"}, {compsite:"source-in"}, {compsite:"source-out"}, {compsite:"source-over"}, {compsite:"xor"} ]; for (var i=0; i