BiLine

A BiLine contains screen coordinates. It can be used to store eg. a line. This class is used in animation. Storage is implemented as a stack where you add points at the end.

This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiLine .

Constructor

new BiLine ( )

Parameters

No parameters.

Properties

NameTypegetsetDescripton
lengthNumbercheckedAccesses internal array length. How many coordinates stored.

Methods

NameDescription
addPointAdds a screen coordinate.
disposeYou should call this whenever you don't need the object any more.
getXAtAccesses horizontal value at specified coordinate.
getYAtAccesses vertical value at specified coordinate.
reverseReverses the order of all coordinates so that the first becomes the last and vice versa.

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

None.

Method Details

addPoint

Adds a screen coordinate.

Syntax

object.addPoint ( x,y )

Parameters

NameTypeOptionalDefaultDescripton
xNumberHorizontal position
yNumberVertical position

Return Type

void

dispose

You should call this whenever you don't need the object any more.

Syntax

object.dispose ( )

Parameters

No arguments.

Return Type

void

getXAt

Accesses horizontal value at specified coordinate.

Syntax

object.getXAt ( index )

Parameters

NameTypeOptionalDefaultDescripton
indexNumberWhich coordinate to return

Return Type

Number Horizontal position

getYAt

Accesses vertical value at specified coordinate.

Syntax

object.getYAt ( index )

Parameters

NameTypeOptionalDefaultDescripton
indexNumberWhich coordinate to return

Return Type

Number Vertical position

reverse

Reverses the order of all coordinates so that the first becomes the last and vice versa.

Syntax

object.reverse ( )

Parameters

No arguments.

Return Type

void