摘要: //绘制扇形 context.lineWidth=1; context.fillStyle="orange"; context.moveTo(100,100); context.arc(100,100,60,Math.PI*7/6,Math.PI*1.5,false); context.fill() 阅读全文
posted @ 2016-03-11 15:35 闹闹猪 阅读(513) 评论(0) 推荐(0) 编辑
摘要: //绘制扇形 context.lineWidth=1; context.fillStyle="orange"; context.moveTo(100,100); context.arc(100,100,60,Math.PI*7/6,Math.PI*1.5,false); context.fill() 阅读全文
posted @ 2016-03-11 15:30 闹闹猪 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 展示图: //绘制圆弧 true:逆时针 false:顺时针 context.lineWidth=5; context.strokeStyle="pink"; context.arc(40,40,30,0,Math.PI*2); context.stroke();//外环是粉色的圆,无填充色 con 阅读全文
posted @ 2016-03-11 11:17 闹闹猪 阅读(2123) 评论(0) 推荐(0) 编辑
摘要: <canvas id="canvas" style="width:500px;height:500px;background:#999">ddafc</canvas><script type="text/javascript"> var canvas=document.getElementById( 阅读全文
posted @ 2016-03-11 10:35 闹闹猪 阅读(689) 评论(0) 推荐(0) 编辑
摘要: 一.一般方法绘制矩形(不常用) <canvas id="canvas" style="width:500px;height:500px;background:#999">ddafc</canvas><script type="text/javascript"> var canvas=document 阅读全文
posted @ 2016-03-11 09:41 闹闹猪 阅读(319) 评论(0) 推荐(0) 编辑