From 98e94502b8b12ba7e797f61b3c952fd8266757c4 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Mon, 15 Nov 2010 21:33:35 -0800 Subject: [PATCH] Another test --- test/public/tests.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/public/tests.js b/test/public/tests.js index c365200..f5720b5 100644 --- a/test/public/tests.js +++ b/test/public/tests.js @@ -1529,4 +1529,16 @@ tests['putImageData() CTM'] = function(ctx){ ctx.translate(20,20); var data = ctx.getImageData(0,0,50,50); ctx.putImageData(data,60,60,10,20,35,30); +}; + +tests['putImageData() alpha'] = function(ctx){ + ctx.fillStyle = 'rgba(255,0,0,0.5)' + ctx.fillRect(0,0,50,100); + ctx.fillStyle = 'rgba(0,255,0,0.5)' + ctx.fillRect(50,0,50,100); + ctx.fillStyle = 'rgba(0,0,255,0.5)' + ctx.fillRect(100,0,50,100); + + var data = ctx.getImageData(0,0,120,20); + ctx.putImageData(data,20,120); }; \ No newline at end of file