height properties of the Rectangle class are independent of
each other; changing the value of one property has no effect on the others.
bottom properties are
integrally related to those four properties. For example, if you change the
value of the
right property, the value of the
width property changes; if you change the
property, the value of the
height property changes.
The following methods and properties use Rectangle objects:
threshold()methods, and the
rectproperty of the BitmapData class
getRect()methods, and the
scale9Gridproperties of the DisplayObject class
getCharBoundaries()method of the TextField class
pixelBoundsproperty of the Transform class
boundsparameter for the
startDrag()method of the Sprite class
printAreaparameter of the
addPage()method of the PrintJob class
You can use the
new Rectangle() constructor to create a
Note: The Rectangle class does not define a rectangular Shape
display object. To draw a rectangular Shape object onscreen, use the
drawRect() method of the Graphics class.
heightproperties as the original Rectangle object.
dxThe value to be added to the left and the right of the Rectangle object. The following equation is used to calculate the new width and position of the rectangle:
dyThe value to be added to the top and the bottom of the Rectangle. The following equation is used to calculate the new height and position of the rectangle:
toIntersectThe Rectangle object to compare against to see if it intersects with this Rectangle object.
heightproperties set to 0.
trueif the Rectangle object's width or height is less than or equal to 0; otherwise