close
The close()
method is used to create a path from a current point to the beginning point.
Example
var ctx = node.getComponent(cc.Graphics);
ctx.moveTo(20, 20);
ctx.lineTo(20, 100);
ctx.lineTo(70, 100);
ctx.close();
ctx.fill();
Return to the Graphics Component Reference documentation..