var canvas = document.createElement('canvas');var ctx = canvas.getContext('2d');ctx.beginPath(); ctx.arc(x, y, radius, startAngle, endAngle, anticlockwise); ctx.closePath();
ctx.fill();
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
ctx.beginPath();
ctx.arc(100, 100, 50, 0, 2 * Math.PI);
ctx.closePath();
ctx.fill();ctx.fillStyle = 'red';
ctx.strokeStyle = 'blue';
ctx.lineWidth = 2;
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
ctx.beginPath();
ctx.arc(100, 100, 50, 0, 2 * Math.PI);
ctx.closePath();
ctx.fillStyle = 'red';
ctx.fill();
ctx.strokeStyle = 'blue';
ctx.lineWidth = 2;
ctx.stroke();本文为翻滚的胖子原创文章,转载无需和我联系,但请注明来自猿教程iskeys.com
