Skip to content

Documentation / @ripl/svg / SVGText

Class: SVGText

Defined in: svg/src/index.ts:427

SVG-specific text element mapping position and content to SVG <text> attributes.

Extends

Implements

Constructors

Constructor

new SVGText(options): SVGText

Defined in: svg/src/index.ts:432

Parameters

ParameterType
optionsTextOptions

Returns

SVGText

Overrides

ContextText.constructor

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
contentpublicstringThe text string to render.ContextText.contentcore/src/context/text.ts:21
definitionpublicSVGContextElementDefinitionThe rendering definition describing this text's SVG <text> node.-svg/src/index.ts:430
idreadonlystringUnique identifier for this text element.SVGContextElement.id ContextText.idcore/src/context/text.ts:14
maxWidth?publicnumberMaximum width, in pixels, the text is scaled to fit within.ContextText.maxWidthcore/src/context/text.ts:23
pathData?publicstringSVG path data along which the text is laid out, for text-on-a-path.ContextText.pathDatacore/src/context/text.ts:25
startOffset?publicnumberOffset along the text path at which rendering begins.ContextText.startOffsetcore/src/context/text.ts:27
xpublicnumberX coordinate of the text's anchor position.ContextText.xcore/src/context/text.ts:17
ypublicnumberY coordinate of the text's anchor position.ContextText.ycore/src/context/text.ts:19