Hide menu
Loading...
Searching...
No Matches
TextComponent

Defines a graphical text component.

Extends

Constructors

Constructor

‍new TextComponent(text?): TextComponent

Creates a text component.

Parameters

text?

string = ‘’'`

Text value.

Returns

TextComponent

Overrides

GraphicalComponent.constructor

Properties

fontSize

‍fontSize: number = 0

Font size of the text.


text

‍text: string = ‘’'`

Text value.

Accessors

direction

Get Signature

‍get direction(): Direction2d

Direction of the text on the 2D plane.

Returns

Direction2d

Set Signature

‍set direction(direction): void

Sets the direction of the text on the 2D plane.

The coordinates are copied from the provided direction.

Parameters

direction

Direction2d

Direction of the text.

Returns

void


id

Get Signature

‍get id(): bigint

Returns the unique identifier of the object.

Returns

bigint

Inherited from

GraphicalComponent.id


origin

Get Signature

‍get origin(): Point2d

Position of the text on the 2D plane.

Returns

Point2d

Set Signature

‍set origin(origin): void

Sets the position of the text on the 2D plane.

The coordinates are copied from the provided point.

Parameters

origin

Point2d

Position of the text.

Returns

void

Methods

accept()

‍accept(visitor): void

Accepts a graphical component visitor.

Parameters

visitor

GraphicalComponentVisitor

Visitor to accept.

Returns

void

Overrides

GraphicalComponent.accept