

TCtx.drawImage(wallimg, 0, 0, wallimg.width, wallimg.height, 0, 0, size * 30, tile_size_height * 30) TiledCanvas.height = tile_size_height * 30 Var tiledCanvas = document.createElement("canvas") Please find the image here of the canvas with tiles (temporary canvas) So it needs to draw (repeat) from center and extra tiles goes top, left, right and bottom.

I actually want those extra spaces of tiles, because they are the correct measuments of tiles on the wall, it means it varies everytime from the user's input.

But right now, they are creating extra spaces on the right side and center of the canvas. So the extra tiles drawn on the image will be splited every corners equally. They draw horizontally or vertically and I want to know if there is a way to draw them from center. I am using context.fillstyle to repeat the patterns. I have created temporary canvas of tiles, which has tiled images of same set with more images, I am drawing these tiles based on the image's size (width and height).
