From 182b60173579d9c9813e02054850ce9ef1ede850 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 12 Nov 2010 14:20:29 -0800 Subject: [PATCH] More drawImage() tests --- test/public/tests.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/public/tests.js b/test/public/tests.js index 0ed652c..04f503a 100644 --- a/test/public/tests.js +++ b/test/public/tests.js @@ -1426,4 +1426,12 @@ tests['drawImage(img,x,y,w,h) scale vertical'] = function(ctx){ ctx.drawImage(img, 0, 0, img.width, 200); }; img.src = 'state.png'; +}; + +tests['drawImage(img,sx,sy,sw,sh,x,y,w,h)'] = function(ctx){ + var img = new Image; + img.onload = function(){ + ctx.drawImage(img, 13, 13, 80, 80, 25, 25, img.width / 2, img.height / 2); + }; + img.src = 'state.png'; }; \ No newline at end of file