Stay organized with collections Save and categorize content based on your preferences.

blockly > utils > Rect

utils.Rect class

Class for representing rectangular regions.


export declare class Rect 


Constructor Modifiers Description
(constructor)(top, bottom, left, right) Constructs a new instance of the Rect class


Property Modifiers Type Description
bottom number
left number
right number
top number


Method Modifiers Description
contains(x, y) Tests whether this rectangle contains a x/y coordinate.
intersects(other) Tests whether this rectangle intersects the provided rectangle. Assumes that the coordinate system increases going down and left.