geometryEditor.model.RootPolygon

Note

The constructor of the geometryEditor.model.RootPolygon class is hidden, as this class is not intended for autonomous initialization.

Extends IGeometryEditorRootModel.

Model for the root polygon. The constructor is not available in the package.full (a standard set of modules). This module is loaded on demand.

Fields | Methods

Fields

Name

Type

Description

events

IEventManager

Event manager.

Inherited from IEventEmitter.

Methods

Name

Returns

Description

destroy()

Destructor.

Inherited from IGeometryEditorModel.

getAllVerticesNumber()

Integer

Returns the total number of vertexes in the geometry being edited.

getPathModels()

geometryEditor.model.ChildLinearRing[]

Returns an array of models for child contours.

getPixels()

Number[]

Returns the model's pixel data.

Inherited from IGeometryEditorModel.

splicePaths(start, deleteCount)

Number[][]

Deletes a defined number of polygon contours, starting from the specified index. New contours can be added in place of the deleted ones. Global pixel coordinates of the new contours can be passed as additional arguments after the "deleteCount" parameter.

Methods details

getAllVerticesNumber

{Integer} getAllVerticesNumber()

Returns the total number of vertexes in the geometry being edited.

getPathModels

{geometryEditor.model.ChildLinearRing[]} getPathModels()

Returns an array of models for child contours.

splicePaths

{Number[][]} splicePaths(start, deleteCount)

Deletes a defined number of polygon contours, starting from the specified index. New contours can be added in place of the deleted ones. Global pixel coordinates of the new contours can be passed as additional arguments after the "deleteCount" parameter.

Returns an array of coordinates of deleted contours.

Parameters:

Parameter

Default value

Description

start*

Type: Integer

The index to start from for removing and adding contours.

deleteCount*

Type: Integer

The number of contours to be deleted.

* Mandatory parameter/option.