moveTo
moveTo 表示一条路径的起点。
| 参数 | 描述 |
|---|---|
| x | 路径的目标位置的 x 坐标 |
| y | 路径的目标位置的 y 坐标 |
实例
var ctx = node.getComponent(cc.Graphics);
ctx.moveTo(0,0);
ctx.lineTo(300,150);
ctx.stroke();
返回 绘图组件
moveTo 表示一条路径的起点。
| 参数 | 描述 |
|---|---|
| x | 路径的目标位置的 x 坐标 |
| y | 路径的目标位置的 y 坐标 |
var ctx = node.getComponent(cc.Graphics);
ctx.moveTo(0,0);
ctx.lineTo(300,150);
ctx.stroke();
返回 绘图组件