IBaseRectangleGeometry

Extends IBaseGeometry, IRectangleGeometryAccess.

Interface for the "Rectangle" geometry.

Constructor | Fields | Events | Methods

Constructor

IBaseRectangleGeometry()

Fields

Name

Type

Description

events

IEventManager

Event manager.

Inherited from IEventEmitter.

Events

Name

Description

change

Change to corner coordinates. Instance of the Event class. Names of fields that are available via the Event.get method:

  • oldCoordinates - Old coordinates of the corners.
  • newCoordinates - New coordinates of the corners.

Inherited from IRectangleGeometryAccess.

Methods

Name

Returns

Description

contains(position)

Boolean

Checks whether the passed point is located inside the rectangle.

Inherited from IRectangleGeometryAccess.

freeze()

IFreezable

Switches the object to "frozen" mode.

Inherited from IFreezable.

getBounds()

Number[][]|null

Returns coordinates of the two opposite corners of the area that surrounds the geometry. The first item in the array is the corner with the smallest coordinate values relative to the rest of the points in the area; the second item is the corner with the largest coordinate values.

Inherited from IBaseGeometry.

getClosest(anchorPosition)

Object

Searches for the point nearest to "anchorPosition" on the rectangle contour.

Inherited from IRectangleGeometryAccess.

getCoordinates()

Number[][]

Returns coordinates of two opposite corners of the rectangle.

Inherited from IRectangleGeometryAccess.

getType()

String

Returns the "Rectangle" string.

isFrozen()

Boolean

Returns true if the object is in "frozen" mode, otherwise false.

Inherited from IFreezable.

setCoordinates(coordinates)

IRectangleGeometryAccess

Sets the coordinates of two opposite corners of the rectangle.

Inherited from IRectangleGeometryAccess.

unfreeze()

IFreezable

Switches the object to active mode.

Inherited from IFreezable.

Methods details

getType

{String} getType()

Returns the "Rectangle" string.