Class that represents a rectangle (with left, top, width, and height).
constructor(left: number, top: number, width: number, height: number): Rect
Initializes a new instance of the Rect class.
Left coordinate of the new Rect.
Top coordinate of the new Rect.
Width of the new Rect.
Height of the new Rect.
contains(pt: any): boolean
Determines whether the rectangle contains a given point or rectangle.
fromBoundingRect(rc: any): Rect
Creates a Rect from ClientRect or SVGRect objects.
Rectangle obtained by a call to the DOM's getBoundingClientRect or GetBoundingBox methods.
inflate(dx: number, dy: number, rectWidth?: number, rectHeight?: number): Rect
Creates a rectangle that results from expanding or shrinking a rectangle by the specified amounts.
intersection(rc1: Rect, rc2: Rect): Rect
Gets a rectangle that represents the intersection of two rectangles.
union(rc1: Rect, rc2: Rect): Rect
Gets a rectangle that represents the union of two rectangles.