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 checked 1 The width
nHeight Number checked 1 The height

Properties

Name Type get set Descripton
height Number checked checked The height of the area
left Number checked checked The left position of the area
top Number checked checked The top position of the area
width Number checked checked 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

Method Details

contains

Tests whether this area completely encloses another area

Syntax

object.contains
 (
 a
 )
 

Parameters

Name Type Optional Default Descripton
a BiArea 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 BiArea 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 BiArea The first area to enclose
a2 BiArea The second area to enclose

Return Type

BiArea