public interface ISVGAnimatedPathData
The SVGAnimatedPathData interface supports elements which have a 'd' attribute which holds SVG path data, and supports the ability to animate that attribute.
The ISVGAnimatedPathData
interface provides two lists to access and modify the base (i.e., static)
contents of the 'd' attribute:
getPathSegList()
provides access to the static/base contents of the 'd'
attribute in a form which matches one-for-one with SVG's syntax.getNormalizedPathSegList()
provides normalized access to the static/base contents of the 'd'
attribute where all path data commands are expressed in terms of the
following subset of OMSVGPathSeg
types:
SVG_PATHSEG_MOVETO_ABS (M), SVG_PATHSEG_LINETO_ABS (L), SVG_PATHSEG_CURVETO_CUBIC_ABS
(C) and SVG_PATHSEG_CLOSEPATH (z).and two lists to access the current animated values of the 'd' attribute:
getAnimatedPathSegList()
provides access to the current animated contents of the 'd'
attribute in a form which matches one-for-one with SVG's syntax.getAnimatedNormalizedPathSegList()
provides normalized access to the current animated contents of the 'd' attribute where all path data commands are
expressed in terms of the following subset of OMSVGPathSeg
types: SVG_PATHSEG_MOVETO_ABS (M), SVG_PATHSEG_LINETO_ABS (L), SVG_PATHSEG_CURVETO_CUBIC_ABS
(C) and SVG_PATHSEG_CLOSEPATH (z).Each of the two lists
are always kept synchronized. Modifications to one list will immediately
cause the corresponding list to be modified. Modifications to getNormalizedPathSegList()
might cause entries in getPathSegList()
to be broken into a set of normalized path segments.
Additionally,
the path/d
attribute on the path element accessed via the XML
DOM (e.g., using the getAttribute()
method call) will reflect
any changes made to getPathSegList()
or getNormalizedPathSegList()
.
Modifier and Type | Method and Description |
---|---|
OMSVGPathSegList |
getAnimatedNormalizedPathSegList()
Provides access to the current animated contents of the 'd'
attribute in a form where all path data commands are expressed in terms
of the following subset of
OMSVGPathSeg
types: SVG_PATHSEG_MOVETO_ABS (M), SVG_PATHSEG_LINETO_ABS (L), SVG_PATHSEG_CURVETO_CUBIC_ABS
(C) and SVG_PATHSEG_CLOSEPATH (z). |
OMSVGPathSegList |
getAnimatedPathSegList()
Provides access to the current animated contents of the 'd'
attribute in a form which matches one-for-one with SVG's syntax.
|
OMSVGPathSegList |
getNormalizedPathSegList()
Provides access to the base (i.e., static) contents of the 'd'
attribute in a form where all path data commands are expressed in terms
of the following subset of
OMSVGPathSeg
types: SVG_PATHSEG_MOVETO_ABS (M), SVG_PATHSEG_LINETO_ABS (L), SVG_PATHSEG_CURVETO_CUBIC_ABS
(C) and SVG_PATHSEG_CLOSEPATH (z). |
OMSVGPathSegList |
getPathSegList()
Provides access to the base (i.e., static) contents of the 'd'
attribute in a form which matches one-for-one with SVG's syntax.
|
OMSVGPathSegList getPathSegList()
getPathSegList()
will have two entries: a SVG_PATHSEG_MOVETO_ABS and a SVG_PATHSEG_ARC_ABS.OMSVGPathSegList getNormalizedPathSegList()
Provides access to the base (i.e., static) contents of the 'd'
attribute in a form where all path data commands are expressed in terms
of the following subset of OMSVGPathSeg
types: SVG_PATHSEG_MOVETO_ABS (M), SVG_PATHSEG_LINETO_ABS (L), SVG_PATHSEG_CURVETO_CUBIC_ABS
(C) and SVG_PATHSEG_CLOSEPATH (z). Thus, if the 'd'
attribute has an "absolute moveto (M)" and an "absolute arcto (A)" command,
then pathSegList will have one SVG_PATHSEG_MOVETO_ABS entry followed by
a series of SVG_PATHSEG_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 OMSVGPathSeg
types are SVG_PATHSEG_MOVETO_ABS
(M), SVG_PATHSEG_LINETO_ABS (L), SVG_PATHSEG_CURVETO_CUBIC_ABS (C) and
SVG_PATHSEG_CLOSEPATH (z).
OMSVGPathSegList getAnimatedPathSegList()
getPathSegList()
.OMSVGPathSegList getAnimatedNormalizedPathSegList()
OMSVGPathSeg
types: SVG_PATHSEG_MOVETO_ABS (M), SVG_PATHSEG_LINETO_ABS (L), SVG_PATHSEG_CURVETO_CUBIC_ABS
(C) and SVG_PATHSEG_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()
.Copyright © 2018. All Rights Reserved.