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

NameTypeOptionalDefaultDescripton
nLeftNumberThe left position
nTopNumberThe top position
nWidthNumberchecked1 The width
nHeightNumberchecked1The height

Properties

NameTypegetsetDescripton
heightNumbercheckedcheckedThe height of the area
leftNumbercheckedcheckedThe left position of the area
topNumbercheckedcheckedThe top position of the area
widthNumbercheckedcheckedThe width of the area

Methods

NameDescription
containsTests whether this area completely encloses another area
equalsWhether this area is representing the same area as another
hitTestTests whether a point is inside the area

Events

None.

Static Methods

NameDescription
encloseThis 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

NameTypeOptionalDefaultDescripton
aBiAreaThe area to test if enclosed

Return Type

Boolean

equals

Whether this area is representing the same area as another

Syntax

object.equals ( oArea )

Parameters

NameTypeOptionalDefaultDescripton
oAreaBiAreaThe area to test with

Return Type

Boolean

hitTest

Tests whether a point is inside the area

Syntax

object.hitTest ( x,y )

Parameters

NameTypeOptionalDefaultDescripton
xNumberThe x coordinate
yNumberThe 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

NameTypeOptionalDefaultDescripton
a1BiAreaThe first area to enclose
a2BiAreaThe second area to enclose

Return Type

BiArea