I have a bunch of png map tiles that I am trying to stitch together on a canvas element.
I am making a 10x10 tile with a counter from 0 to 99 (
ctx.drawImage(this, id%10*imgWidth, Math.floor(id/10)*imgHeight, imgWidth, imgHeight);
One reason to not use jQuery with canvas:
:) as this refers to the element size, not the bitmap. I would suggest using instead:
myCanvas.width = imgWidth*10; myCanvas.height = imgHeight*10;