Rectangle
Description
A basic Rectangle class.
API overview
Constructor
Rectangle
(
_x: Number
= 0
,
_y: Number
= 0
,
_width: Number
= 0
,
_height: Number
= 0
)
Attributes
Public attributes
bottom: Number | read-only |
height: Number | |
left: Number | read-only |
maxX: Number | read-only |
maxY: Number | read-only |
minX: Number | read-only |
minY: Number | read-only |
right: Number | read-only |
top: Number | read-only |
width: Number | |
x: Number | |
y: Number |
Functions
Public functions
clone (): Rectangle |
native Make a copy of this Rectangle |
contains ( _x: Number , _y: Number ): Boolean | native |
containsPoint ( p: Point ): Boolean |
native Returns true if p is inside the bounds of this rectangle |
expandByPoint ( p: Point ): Void |
native If p is outside of the rectangle's current bounds, expand it to include p |
intersects ( rect1: Rectangle , rect2: Rectangle ): Boolean |
static Returns true if any part of the two rectangles overlaps |
setTo ( _x: Number , _y: Number , _width: Number , _height: Number ): Void |
native Assign the x,y,width,height of this rectangle |
Constructor
Attributes
Functions
containsPoint ( p: Point ): Boolean
native
Returns true if p is inside the bounds of this rectangle.
Parameters
p: Point |
expandByPoint ( p: Point ): Void
native
If p is outside of the rectangle's current bounds, expand it to include p.
Parameters
p: Point |
getFullTypeName
(): String
Inherited from Object
native
Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.
Returns
String | fully qualified type name of the Object. |
getType
(): Type
Inherited from Object
native
Gets the Type that describes the Object.
Returns
Type | The Type that describes the object. |
getTypeName
(): String
Inherited from Object
native
Gets the type name of the Object.
Returns
String | type name of the Object. |
intersects ( rect1: Rectangle , rect2: Rectangle ): Boolean
static
Returns true if any part of the two rectangles overlaps.
Parameters
rect1: Rectangle | |
rect2: Rectangle |