Skip to content
Armen edited this page Apr 29, 2012 · 15 revisions

Defined in types.js

Summary

a2d.Rectangle(topLeft, bottomRight)
Rectangle

Method Summary

**[add](#add)** (pos) Moves a rectangle by a position
_boolean_ **[overlaps](#overlaps)** (other) Checks if this rectangle overlaps another.
### Property Summary
*a2d.Position* **[bottomLeft](#bottomLeft)**
*a2d.Position* **[bottomRight](#bottomRight)**
*a2d.Position* **[topLeft](#topLeft)**
*a2d.Position* **[topRight](#topRight)**

Detail

a2d.Rectangle(topLeft, bottomRight)
Rectangle

Parameters:

{a2d.Position} topLeft
{a2d.Position} bottomRight


Method Detail

add (pos)
Moves a rectangle by a position

Parameters:

{a2d.Position} pos

-- {boolean} overlaps (other)
Checks if this rectangle overlaps another.

Parameters:

{a2d.Rectangle} other

Returns:

{boolean}
true if the rectangles overlap.


Property Detail

{a2d.Position} bottomLeft

-- {a2d.Position} bottomRight

-- {a2d.Position} topLeft

-- {a2d.Position} topRight


Clone this wiki locally