circle
circle() 方法创建椭圆。
| 参数 | 描述 |
|---|---|
| cx | 圆的中心的 x 坐标。 |
| cy | 圆的中心的 y 坐标。 |
| r | 圆的半径。 |
实例
var ctx = node.getComponent(cc.Graphics);
ctx.circle(200,200, 200);
ctx.fill();
circle() 方法创建椭圆。
| 参数 | 描述 |
|---|---|
| cx | 圆的中心的 x 坐标。 |
| cy | 圆的中心的 y 坐标。 |
| r | 圆的半径。 |
var ctx = node.getComponent(cc.Graphics);
ctx.circle(200,200, 200);
ctx.fill();