第九章 画布方法
<canvas height
="500" width
="500" id
="canvas"></canvas
>
<script
>
var elem
=document
.getElementById("canvas");
var canvas
=elem
.getContext("2d");
canvas
.save();
canvas
.beginPath();
canvas
.scale(1.5,0.9);
canvas
.rect(100,100,100,100);
canvas
.closePath();
canvas
.fillStyle
="red";
canvas
.fill();
canvas
.restore();
</script
>
转载请注明原文地址:https://blackberry.8miu.com/read-32.html