MoveTo

Use moveTo method set 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.Graphics);
ctx.moveTo(0,0);
ctx.lineTo(300,150);
ctx.fill();


Return to Graphics Component Reference.

results matching ""

    No results matching ""