Skip to content

API / Point

类: Point

定义于: geom/Point.ts:31

Point 对象表示二维坐标系统中的某个位置。

构造函数

构造函数

ts
new Point(x: number, y: number): Point;

定义于: geom/Point.ts:63

创建一个 egret.Point 对象.若不传入任何参数,将会创建一个位于(0,0)位置的点。

参数

参数类型默认值描述
xnumber0.0该对象的x属性值,默认为 0.0。
ynumber0.0该对象的y属性值,默认为 0.0。

返回

Point

属性

x

ts
x: number;

定义于: geom/Point.ts:40

该点的水平坐标。

默认值

ts
0.0

y

ts
y: number;

定义于: geom/Point.ts:49

该点的垂直坐标。

默认值

ts
0.0

Released under the MIT License.