Rectangle
| Kind of class: | class |
|---|---|
| Inherits from: | BaseShape < CoreObject |
| Version: | 08/02/07 |
| Author: | Aaron Clinger |
| Classpath: | org.casaframework.math.geom.Rectangle |
| File last modified: | Sunday, 19 August 2007, 13:43:31 |
Stores position and size of a rectangle (or square).
Summary
Constructor
Instance properties
Instance properties inherited from CoreObject
Instance methods
Instance methods inherited from BaseShape
Instance methods inherited from CoreObject
Constructor
Rectangle
function Rectangle (x:Number,
y:Number,
width:Number,
height:Number)
Creates new rectangle object.
Parameters:
x :
The horizontal position of the rectangle.
y :
The vertical position of the rectangle.
width :
Width of the rectangle.
height:
[optional] Height of the rectangle. If
undefined assumes height matches width (Creates square).Instance methods
clone
function clone () : Rectangle
Returns:
A new rectangle object with the same values as this rectangle.
equals
function equals (rectangleObject:Rectangle) : Boolean
Determines whether the rectangle specified in the
rectangleObject parameter is equal to this rectangle object.Parameters:
rectangleObject:
A defined Rectangle object.
getX2
function getX2 () : Number
Returns:
The right X position of the rectangle.
getY2
function getY2 () : Number
Returns:
The bottom Y position of the rectangle.
setX2
function setX2 (x:Number) : Void
Sets the right position of the rectangle.
Parameters:
x:
The right X position of the rectangle.
setY2
function setY2 (y:Number) : Void
Sets the bottom position of the rectangle.
Parameters:
y:
The bottom Y position of the rectangle.