使用javascript对canvas画图的时候遇到的问题
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
context.beginPath();
context.arc(canvas.width/2, canvas.height/2, 50, 0, Math.PI*2, false);
context.clip();
context.lineWidth = 10;
context.closePath(); //为什么去掉这两行之后才能够显示出lineWidth为10的边界
context.beginPath(); //还有这一行
context.fillStyle = "red";
context.fillRect(0, 0, canvas.width, canvas.height);
context.stroke();
context.closePath();