API / Rectangle
Class: Rectangle
Defined in: geom/Rectangle.ts:39
A Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y) and by its width and its height.
The x, y, width, and height properties of the Rectangle class are independent of each other; changing the value of one property has no effect on the others. However, the right and bottom properties are integrally related to those four properties. For example, if you change the value of the right property, the value of the width property changes; if you change the bottom property, the value of the height property changes.
Properties
height
height: number;
Defined in: geom/Rectangle.ts:75
矩形的高度(以像素为单位)。
Default
0.0
width
width: number;
Defined in: geom/Rectangle.ts:66
The width of the rectangle, in pixels.
Default
0.0
x
x: number;
Defined in: geom/Rectangle.ts:48
The x coordinate of the top-left corner of the rectangle.
Default
0.0
y
y: number;
Defined in: geom/Rectangle.ts:57
The y coordinate of the top-left corner of the rectangle.
Default
0.0