- All Known Subinterfaces:
SVGPathElement
- All Known Implementing Classes:
SVGOMAnimatedPathData
,SVGOMPathElement
d
attribute which holds SVG path
data.-
Method Details
-
getPathSegList
SVGPathSegList getPathSegList()Gets the base contents of thed
attribute.The base (i.e., static) contents of the
d
attribute are provided in a form which matches one-for-one with SVG's syntax. Thus, if thed
attribute has an "absolute moveto (M)" and an "absolute arcto (A)" command, thenpathSegList
will have two entries: aPATHSEG_MOVETO_ABS
and aPATHSEG_ARC_ABS
.- Returns:
- the base contents of the
d
attribute.
-
getNormalizedPathSegList
SVGPathSegList getNormalizedPathSegList()Gets the normalized contents of thed
attribute.The base (i.e., static) contents of the
d
attribute are provided in a form where all path data commands are expressed in terms of the following subset ofSVGPathSeg
types:PATHSEG_MOVETO_ABS
(M
),PATHSEG_LINETO_ABS
(L
),PATHSEG_CURVETO_CUBIC_ABS
(C
) andPATHSEG_CLOSEPATH
(z
).Thus, if the
d
attribute has an "absolute moveto (M)" and an "absolute arcto (A)" command, thennormalizedpathSegList
will have onePATHSEG_MOVETO_ABS
entry followed by a series ofPATHSEG_LINETO_ABS
entries which approximate the arc. This alternate representation is available to provide a simpler interface to developers who would benefit from a more limited set of commands.The only valid
SVGPathSeg
types arePATHSEG_MOVETO_ABS
(M
),PATHSEG_LINETO_ABS
(L
),PATHSEG_CURVETO_CUBIC_ABS
(C
) andPATHSEG_CLOSEPATH
(z
).- Returns:
- the normalized contents of the
d
attribute.
-
getAnimatedPathSegList
SVGPathSegList getAnimatedPathSegList()Gets the current animated contents of thed
attribute.The current animated contents of the
d
attribute are provided in a form which matches one-for-one with SVG's syntax. If the given attribute or property is being animated, contains the current animated value of the attribute or property, and both the object itself and its contents are read only. If the given attribute or property is not currently being animated, gives the same value asgetPathSegList()
.- Returns:
- the current animated contents of the
d
attribute.
-
getAnimatedNormalizedPathSegList
SVGPathSegList getAnimatedNormalizedPathSegList()Gets the normalized current animated contents of thed
attribute.The current animated contents of the
d
attribute are provided in a form where all path data commands are expressed in terms of the following subset ofSVGPathSeg
types:PATHSEG_MOVETO_ABS
(M
),PATHSEG_LINETO_ABS
(L
),PATHSEG_CURVETO_CUBIC_ABS
(C
) andPATHSEG_CLOSEPATH
(z
).If the given attribute or property is being animated, contains the current animated value of the attribute or property, and both the object itself and its contents are read only. If the given attribute or property is not currently being animated, contains the same value as
getNormalizedPathSegList()
.- Returns:
- the normalized current animated contents of the
d
attribute.
-