ComponentOne ASP.NET MVC Controls
Rect Class
File
wijmo.js
Module
wijmo

Class that represents a rectangle (with left, top, width, and height).

Constructor

Properties

Methods

Constructor

constructor

constructor(left: number, top: number, width: number, height: number): Rect

Initializes a new instance of the Rect class.

Parameters
Returns
Rect

Properties

bottom

Gets the bottom coordinate of this Rect.

Type
number

height

Gets or sets the height of this Rect.

Type
number

left

Gets or sets the left coordinate of this Rect.

Type
number

top

Gets or sets the top coordinate of this Rect.

Type
number

width

Gets or sets the width of this Rect.

Type
number

Methods

clone

clone(): Rect

Creates a copy of this Rect.

Returns
Rect

contains

contains(pt: any): boolean

Determines whether the rectangle contains a given point or rectangle.

Parameters
Returns
boolean

equals

equals(rc: Rect): boolean

Returns true if a Rect has the same coordinates and dimensions as this Rect.

Parameters
Returns
boolean

 

Static fromBoundingRect
fromBoundingRect(rc: any): Rect

Creates a Rect from ClientRect or SVGRect objects.

Parameters
Returns
Rect

inflate

inflate(dx: number, dy: number): Rect

Creates a rectangle that results from expanding or shrinking a rectangle by the specified amounts.

Parameters
Returns
Rect

 

Static intersection
intersection(rc1: Rect, rc2: Rect): Rect

Gets a rectangle that represents the intersection of two rectangles.

Parameters
Returns
Rect

 

Static union
union(rc1: Rect, rc2: Rect): Rect

Gets a rectangle that represents the union of two rectangles.

Parameters
Returns
Rect