From 0ce4a8fb03ae62f7df86cf4ecc604451787684f7 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Thu, 18 Nov 2010 11:57:09 -0800 Subject: [PATCH] More tests --- test/public/tests.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/public/tests.js b/test/public/tests.js index 79a355a..79a83d2 100644 --- a/test/public/tests.js +++ b/test/public/tests.js @@ -1477,6 +1477,20 @@ tests['drawImage(img,0,0) globalAlpha'] = function(ctx, done){ img.src = 'state.png'; }; +tests['drawImage(img,0,0) clip'] = function(ctx){ + ctx.arc(50,50,50,0,Math.PI * 2,false); + ctx.stroke(); + ctx.clip(); + var img = new Image; + ctx.fillRect(50,50,30,30); + ctx.globalAlpha = .5; + img.onload = function(){ + ctx.drawImage(img, 0, 0); + done(); + }; + img.src = 'state.png'; +}; + tests['putImageData()'] = function(ctx){ for (i=0;i<6;i++){ for (j=0;j<6;j++){