Merge pull request #368 from mikeprimm/master

Go back to pixel by pixel blit - makes webkit browsers less fuzzy
This commit is contained in:
mikeprimm 2011-08-03 11:19:53 -07:00
commit d6388aab31

View File

@ -8,13 +8,12 @@ var cloneCanvas = function(self) {
};
function blitImage(ctx, image, sx ,sy, sw, sh, dx, dy, dw, dh) {
ctx.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh);
// var x; var y;
// for (x=0;x<dw;x++) {
// for (y=0;y<dh;y++) {
// ctx.drawImage(image,Math.floor(sx+x*(sw/dw)),Math.floor(sy+y*(sw/dw)),1,1,dx+x,dy+y,1,1);
// }
// }
var x; var y;
for (x=0;x<dw;x++) {
for (y=0;y<dh;y++) {
ctx.drawImage(image,Math.floor(sx+x*(sw/dw)),Math.floor(sy+y*(sw/dw)),1,1,dx+x,dy+y,1,1);
}
}
}
function createMinecraftHead(player,completed,failed) {