Rect interface

A representation of a rectangle in a 2D space.

Signature:

export interface Rect 

Properties

PropertyModifiersTypeDescription
heightreadonlynumberThe height of the rectangle in pixels
widthreadonlynumberThe width of the rectangle in pixels
xreadonlynumberThe position of the top left corner of the rectangle along the x-axis in pixels
yreadonlynumberThe position of the top left corner of the rectangle along the y-axis in pixels

Rect.height property

The height of the rectangle in pixels

Signature:

readonly height: number;

Rect.width property

The width of the rectangle in pixels

Signature:

readonly width: number;

Rect.x property

The position of the top left corner of the rectangle along the x-axis in pixels

Signature:

readonly x: number;

Rect.y property

The position of the top left corner of the rectangle along the y-axis in pixels

Signature:

readonly y: number;