new Rectangle(left, top, right, bottom)
Name | Type | Description |
---|---|---|
left |
number | optional Left coordinate. 0 - default. |
top |
number | optional Top coordinate. 0 - default. |
right |
number | optional Right coordinate. 0 - default. |
bottom |
number | optional Bottom coordinate. 0 - default. |
Members
-
bottomnumber
-
Top coordinate.
-
leftnumber
-
Left coordinate.
-
rightnumber
-
Right coordinate.
-
topnumber
-
Top coordinate.
Methods
-
clone(){Rectangle}
-
Clone rectangle object.
Returns:
Type Description Rectangle -
fit(width, height)
-
Returns true if rectangle fits their size in width and height.
Name Type Description width
number Width. height
number Height. -
getDiagonal()
-
Returns rectangle diagonal size.
-
getHeight()
-
Returns rectangle height.
-
getSquare()
-
Returns rectangle area.
-
getWidth()
-
Returns rectangle width.