Skip to content

Documentation / @ripl/core / ContextText

Class: ContextText

Defined in: packages/core/src/context/text.ts:11

A virtual text element capturing position, content, and optional path-based text layout.

Extended by

Implements

Constructors

Constructor

new ContextText(__namedParameters): ContextText

Defined in: packages/core/src/context/text.ts:29

Parameters

ParameterType
__namedParametersTextOptions

Returns

ContextText

Properties

PropertyModifierTypeDescriptionDefined in
contentpublicstringThe text string to render.packages/core/src/context/text.ts:21
idreadonlystringUnique identifier for this text element.packages/core/src/context/text.ts:14
maxWidth?publicnumberMaximum width, in pixels, the text is scaled to fit within.packages/core/src/context/text.ts:23
pathData?publicstringSVG path data along which the text is laid out, for text-on-a-path.packages/core/src/context/text.ts:25
startOffset?publicnumberOffset along the text path at which rendering begins.packages/core/src/context/text.ts:27
xpublicnumberX coordinate of the text's anchor position.packages/core/src/context/text.ts:17
ypublicnumberY coordinate of the text's anchor position.packages/core/src/context/text.ts:19