utils.Rect class
Class for representing rectangular regions.
Signature:
export declare class Rect
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(top, bottom, left, right) | Constructs a new instance of the Rect class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
bottom | number | ||
left | number | ||
right | number | ||
top | number |
Methods
Method | Modifiers | Description |
---|---|---|
contains(x, y) | Tests whether this rectangle contains a x/y coordinate. | |
getHeight() | ||
getWidth() | ||
intersects(other) | Tests whether this rectangle intersects the provided rectangle. Assumes that the coordinate system increases going down and left. |