stroke

The stroke() method 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 the Graphics Component Reference documentation..

results matching ""

    No results matching ""