|
|
@ -1554,12 +1554,24 @@ tests['putImageData() 8'] = function(ctx){ |
|
|
|
ctx.fillRect(j*25,i*25,25,25); |
|
|
|
} |
|
|
|
} |
|
|
|
ctx.strokeRect(60,60,50,30); |
|
|
|
ctx.translate(20,20); |
|
|
|
var data = ctx.getImageData(0,0,50,50); |
|
|
|
ctx.putImageData(data,-10,-10,0,20,35,30); |
|
|
|
}; |
|
|
|
|
|
|
|
tests['putImageData() 9'] = function(ctx){ |
|
|
|
for (i=0;i<6;i++){ |
|
|
|
for (j=0;j<6;j++){ |
|
|
|
ctx.fillStyle = 'rgb(' + Math.floor(255-42.5*i) + ',' + |
|
|
|
Math.floor(255-42.5*j) + ',0)'; |
|
|
|
ctx.fillRect(j*25,i*25,25,25); |
|
|
|
} |
|
|
|
} |
|
|
|
ctx.translate(20,20); |
|
|
|
var data = ctx.getImageData(0,0,50,50); |
|
|
|
ctx.putImageData(data,-10,-10,0,20,500,500); |
|
|
|
}; |
|
|
|
|
|
|
|
tests['putImageData() alpha'] = function(ctx){ |
|
|
|
ctx.fillStyle = 'rgba(255,0,0,0.5)' |
|
|
|
ctx.fillRect(0,0,50,100); |
|
|
|