Browse Source

More drawImage() tests

v1.x
Tj Holowaychuk 14 years ago
parent
commit
182b601735
  1. 8
      test/public/tests.js

8
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';
};
Loading…
Cancel
Save