Clears

The clear() function is used to clear all paths.

Example

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

Return to the Graphics Component Reference documentation.

results matching ""

    No results matching ""