Move To

The moveTo() method sets the starting point of a path.

Parameter | Description | | -------------- | ----------- | | x | The x coordinate of the target location of the path. | | y | The y coordinate of the target position of the path. |

Example

var ctx = node.getComponent(cc.GraphicsComponent);
ctx.moveTo(0,0);
ctx.lineTo(300,150);
ctx.stroke();


Return to the Graphics Component Reference documentation.

results matching ""

    No results matching ""