Hide menu
Loading...
Searching...
No Matches
DrawingPointSet

Describes drawing elements composed of 2D points.

This geometric element encapsulates the portion of the view's geometry described with 2D points.

Extends

Constructors

Constructor

new DrawingPointSet(): PointSet

Returns

PointSet

Inherited from

DrawingGeometry.constructor

Properties

points

readonly points: Point2d[] = []

Collection of points.

Accessors

id

Get Signature

get id(): bigint

Returns object id.

Returns

bigint

Inherited from

DrawingGeometry.id


numberOfPoints

Get Signature

get numberOfPoints(): number

Returns the number of points currently composing the element.

Deprecated

Use points.length instead.

Returns

number


uuid

Get Signature

get uuid(): `${string}-${string}-${string}-${string}-${string}` | null

Returns uuid of the drawing element. null if the drawing element has no assigned uuid (by default).

Returns

`${string}-${string}-${string}-${string}-${string}` | null

Set Signature

set uuid(uuid): void

Sets uuid of the drawing element.

Parameters

uuid

Uuid of the drawing element.

`${string}-${string}-${string}-${string}-${string}` | null

Returns

void

Inherited from

DrawingGeometry.uuid

Methods

accept()

accept(visitor): void

Accepts a drawing element visitor.

Parameters

visitor

ElementVisitor

Accepted drawing element visitor.

Returns

void

Overrides

DrawingGeometry.accept


addPoint()

addPoint(point): void

Adds the point to the element.

Parameters

point

Point2d

Added point.

Returns

void

Deprecated

Use points.push(`point`) instead.


point()

point(index): Point2d

Returns the specified point of the element.

Throws exception if index is not in range [0, numberOfPoints()-1].

Parameters

index

number

Point index.

Returns

Point2d

Warning

index must be in the range [0, numberOfPoints()-1].

Deprecated

Use points[`index`] instead.