Constructors
constructor
- new Rect(x?: number, y?: number, width?: number, height?: number): Rect
-
Parameters
-
x: number = 0
-
y: number = 0
-
width: number = 0
-
height: number = 0
Properties
height
height: number = 0
Accessors
bottom
- get bottom(): number
-
Returns number
centerX
- get centerX(): number
-
Returns number
centerY
- get centerY(): number
-
Returns number
h
- get h(): number
-
Returns number
left
- get left(): number
-
Returns number
right
- get right(): number
-
Returns number
top
- get top(): number
-
Returns number
w
- get w(): number
-
Returns number
Methods
contains
- contains(x: number, y: number, width?: number, height?: number): boolean
-
Parameters
-
x: number
-
y: number
-
width: number = 0
-
height: number = 0
Returns boolean
containsRect
- containsRect(other: Rect): boolean
-
Returns boolean
extend
- extend(x: number, y: number, width?: number, height?: number): Rect
-
Parameters
-
x: number
-
y: number
-
width: number = 0
-
height: number = 0
intersects
- intersects(rect: Rect): boolean
-
Returns boolean
isEmpty
- isEmpty(): boolean
-
Returns boolean
pad
- pad(top: number, left: number, bottom: any, right: number): Rect
-
Parameters
-
top: number
-
left: number
-
bottom: any
-
right: number
setValues
- setValues(x?: number, y?: number, width?: number, height?: number): Rect
-
Parameters
-
x: number = 0
-
y: number = 0
-
width: number = 0
-
height: number = 0
Based on easeljs Rectangle