clear

clear() 清空所有路径。

实例

  1. update: function (dt) { var ctx = node.getComponent(cc.Graphics); ctx.clear(); ctx.circle(200,200, 200); ctx.stroke();}

绘图组件