AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
## Canvas描边与填充 ~~~ ctx.moveTo(0,0); ctx.lineTo(100,100); ctx.lineTo(100,200); ctx.fill(); //ctx.stroke(); ~~~ > fill()把路径闭合并填充路径的内部区域,默认黑色 > stroke()描边 ~~~ ctx.moveTo(0,0); ctx.lineTo(100,100); ctx.lineTo(100,200); ctx.closePath(); ctx.lineWidth=10; ctx.strokeStyle="blue"; ctx.stroke(); ctx.fillStyle="rgba(0 ,255, 0 ,0.5)"; ctx.fill(); ~~~ ### 例子 ~~~ ctx.strokeRect(300,100,200,100); ctx.fillRect(300,100,200,100); ctx.beginPath(); ctx.arc(200,200,50,0,2*Math.PI,true); ctx.fillStyle="rgba(0 ,0, 255 ,0.5)"; ctx.fill(); ~~~