Constructors
constructor
- new Rect(x: number, y: number, width: number, height: number): Rect
-
Parameters
-
x: number
-
y: number
-
width: number
-
height: number
Properties
Readonly height
height: number
Readonly width
width: number
Readonly x
x: number
Readonly y
y: number
Accessors
bottom
-
Returns number
left
-
Returns number
right
-
Returns number
top
-
Returns number
Methods
Static clipPointToRect
-
Parameters
Static create
- create(x: number, y: number, width: number, height: number): Rect
-
Parameters
-
x: number
-
y: number
-
width: number
-
height: number
Static createCopy
-
Parameters
Static createWithCoords
- createWithCoords(left: number, top: number, right: number, bottom: number): Rect
-
Parameters
-
left: number
-
top: number
-
right: number
-
bottom: number
Static createWithPoints
-
Parameters
Static createZero
-
Static isEqual
- isEqual(rect1: Rect, rect2: Rect): boolean
-
Parameters
Returns boolean
Class to represent a rectangle in 2D space