Rect

Class for representing rectangles.

Created by

new Rect( x, y, w, h )

Parameters

Parameter Type Description
x Number Left
y Number Top
w Number Width
h Number Height

Properties

Parameter Type Description
left Number Left
top Number Top
width Number Width
height Number Height

Methods

Method Description
boundingRect Expands this rectangle to also include the area of another rectangle
boundingRect (static) Expands this rectangle to also include the area of another rectangle
clone Makes a new copy of a rectangle.
contains Tests whether rectangle entirely contains another rectangle
equals Tests rectangle equality
fromControl Creates rectangle equal to control position and size
getSize Returns size of rectangle
grow Grows rectangle in specified directions
intersection Computes intersection (common area) of two given rectangles
intersects Tests if rectangle intersects with another.
toControl Positions control to coordinates defined by rectangle
toString Returns string representation of Rect object

Example

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.