clear

clear() 清空所有路径。

实例

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

返回 绘图组件

results matching ""

    No results matching ""