Skip to main content

LineDefinition

Class representing a line definition.

Extends

Constructors

new LineDefinition()

new LineDefinition(start, end): LineDefinition

Creates an instance of LineDefinition.

Parameters

start: Point

The starting point of the line.

end: Point

The ending point of the line.

Returns

LineDefinition

Overrides

ShapeDefinition.constructor

Defined in

definitions/LineDefinition.ts:20

Properties

end

end: Point

The ending point of the line.

Defined in

definitions/LineDefinition.ts:12


start

start: Point

The starting point of the line.

Defined in

definitions/LineDefinition.ts:9

Methods

toArray()

toArray(): any[]

Converts the object's properties to an array. If any of the properties are objects that implement ISerializable, their toArray method is called.

Returns

any[]

An array representation of the object's properties.

Inherited from

ShapeDefinition.toArray

Defined in

common/Serializable.ts:16


toJson()

toJson(): string

Converts the object to a JSON string. If any of the properties are objects that implement ISerializable, their toJson method is called. Underscores e.g. of private members are trimmed when setting the serialized name.

Returns

string

A JSON string representation of the object.

Inherited from

ShapeDefinition.toJson

Defined in

common/Serializable.ts:32