transformで3倍にして表示
canvas = document.getElementById('canvas'); ctx = canvas.getContext('2d'); //標準の四角形 ctx.strokeStyle = "red"; ctx.strokeRect(40, 50, 60, 60); /* 3倍の拡大する変換マトリックス定義 */ ctx.setTransform(3, 0, 0, 3, 0, 0); ctx.strokeStyle = "green"; ctx.strokeRect(40, 50, 60, 60);