BiArea
This class represents an area with a given left, top, width and height
This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiArea .
Constructor
new BiArea ( nLeft,nTop [ ,nWidth [ ,nHeight ] ] )
Parameters
| Name | Type | Optional | Default | Descripton |
nLeft | Number | The left position | ||
nTop | Number | The top position | ||
nWidth | Number | ![]() | 1 | The width |
nHeight | Number | ![]() | 1 | The height |
Properties
| Name | Type | get | set | Descripton |
height | Number | ![]() | ![]() | The height of the area |
left | Number | ![]() | ![]() | The left position of the area |
top | Number | ![]() | ![]() | The top position of the area |
width | Number | ![]() | ![]() | The width of the area |
Methods
| Name | Description |
contains | Tests whether this area completely encloses another area |
equals | Whether this area is representing the same area as another |
hitTest | Tests whether a point is inside the area |
Events
None.
Static Methods
| Name | Description |
enclose | This takes two areas and returns another area that completely encloses both these areas |
Static Fields
None.
Remarks
None.
Method Details
contains
Tests whether this area completely encloses another area
Syntax
object.contains ( a ) Parameters
| Name | Type | Optional | Default | Descripton |
a | | The area to test if enclosed |
Return Type
Boolean
equals
Whether this area is representing the same area as another
Syntax
object.equals ( oArea ) Parameters
| Name | Type | Optional | Default | Descripton |
oArea | | The area to test with |
Return Type
Boolean
hitTest
Tests whether a point is inside the area
Syntax
object.hitTest ( x,y ) Parameters
| Name | Type | Optional | Default | Descripton |
x | Number | The x coordinate | ||
y | Number | The y coordinate |
Return Type
Boolean
Static Method Details
enclose
This takes two areas and returns another area that completely encloses both these areas
Syntax
BiArea . enclose ( a1,a2 ) Parameters
| Name | Type | Optional | Default | Descripton |
a1 | | The first area to enclose | ||
a2 | | The second area to enclose |
