0
當我轉換HTML5畫布上下文並繪製橢圓時,隨着變換變大,橢圓輪廓變得完全扭曲。以下是一些示例代碼以及我在Firefox和Chrome中看到的結果。HTML5畫布橢圓輪廓在轉換後變爲
<body>
<canvas id="myCanvas" width=900 height=900></canvas>
<script>
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "rgba(0, 51, 255, 0.5)";
ctx.lineWidth = 2;
ctx.beginPath();
ctx.transform(1, 0, 0, 1, -16776544, -16776916);
ctx.ellipse(16776994, 16777316, 400, 400, 0, 0, 2 * Math.PI);
ctx.stroke();
ctx.fill();
</script>
</body>
是有辦法解決的失真,或者是它的地方,記載有在畫布上改造的限制?