Skip to content

Rect

Structure representing a rectangle.

The structure has a width, height and a coordinate in a two-dimensional coordinate system.

Height of rectangle.

height: number

The height of the rectangle.

Maximum X value.

maxX: number

The greatest x-coordinate in the rectangle.

Read-only.

Maximum Y value.

maxY: number

The greatest y-coordinate in the rectangle.

Read-only.

Minimum X value.

minX: number

The smallest x-coordinate in the rectangle.

Read-only.

Minimum Y value.

minY: number

The smallest y-coordinate in the rectangle.

Read-only.

Point that specifies the rectangles origin.

origin: Point

The x- and y-coordinate that specifies the rectangles origin as a Point structure.

Size of the rectangle.

size: Size

The width and height of the rectangle as a Size structure.

Width of rectangle.

width: number

The width of the rectangle.

X value.

x: number

The x-coordinate of the rectangle.

Y value.

y: number

The y-coordinate of the rectangle.

Constructs a rectangle.

new Rect(x: number, y: number, width: number, height: number)

Constructs a new rectangle placed in a two-dimensional coordinate system.

x number

X coordinate.

y number

Y coordinate.

width number

Width of rectangle.

height number

Height of rectangle.