SVGTextPathElement
The SVGTextPathElement interface corresponds to the <textPath> element.
Constants
Method types
| Name | Value | Description |
|---|---|---|
TEXTPATH_METHODTYPE_UNKNOWN | 0 | The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. |
TEXTPATH_METHODTYPE_ALIGN | 1 | Corresponds to the value align. |
TEXTPATH_METHODTYPE_STRETCH | 2 | Corresponds to the value stretch. |
Spacing types
| Name | Value | Description |
|---|---|---|
TEXTPATH_SPACINGTYPE_UNKNOWN | 0 | The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. |
TEXTPATH_SPACINGTYPE_AUTO | 1 | Corresponds to the value auto. |
TEXTPATH_SPACINGTYPE_EXACT | 2 | Corresponds to the value exact. |
Properties
This interface also inherits properties from its parent interface, SVGTextContentElement.
-
SVGTextPathElement.hrefRead only -
An
SVGAnimatedStringcorresponding to thehreforxlink:hrefattribute of the given element. -
SVGTextPathElement.startOffsetRead only -
An
SVGAnimatedLengthcorresponding to the X component of thestartOffsetattribute of the given element. -
SVGTextPathElement.methodRead only -
An
SVGAnimatedEnumerationcorresponding to themethodattribute of the given element. It takes one of theTEXTPATH_METHODTYPE_*constants defined on this interface. -
SVGTextPathElement.spacingRead only -
An
SVGAnimatedEnumerationcorresponding to thespacingattribute of the given element. It takes one of theTEXTPATH_SPACINGTYPE_*constants defined on this interface.
Methods
This interface does not provide any specific methods, but implements those of its parent, SVGTextContentElement.
Specifications
| Specification |
|---|
| Scalable Vector Graphics (SVG) 1.1 (Second Edition) (SVG) # InterfaceSVGTextPathElement |
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
SVGTextPathElement |
1 |
12 |
2 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
href |
1 |
12 |
2 |
9 |
≤12.1 |
≤4 |
≤37 |
18 |
4 |
≤12.1 |
≤3 |
1.0 |
method |
1 |
12 |
20 |
9 |
≤12.1 |
3.1 |
≤37 |
18 |
20 |
≤12.1 |
2 |
1.0 |
spacing |
1 |
12 |
20 |
9 |
≤12.1 |
3.1 |
≤37 |
18 |
20 |
≤12.1 |
2 |
1.0 |
startOffset |
1 |
12 |
20 |
9 |
≤12.1 |
3.1 |
≤37 |
18 |
20 |
≤12.1 |
2 |
1.0 |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGTextPathElement