Stroke

The stroke() method actually draws a path defined by a path method such as moveTo() and lineTo(). The default color is black.

Example

var ctx = node.getComponent(cc.Graphics);
ctx.moveTo(20,100);
ctx.lineTo(20,20);
ctx.lineTo(70,20);
ctx.fill();


Return to Graphics component.

results matching ""

    No results matching ""