Package org.apache.batik.anim.dom
Class SVGOMAnimatedPathData
- java.lang.Object
-
- org.apache.batik.anim.dom.AbstractSVGAnimatedValue
-
- org.apache.batik.anim.dom.SVGOMAnimatedPathData
-
- All Implemented Interfaces:
AnimatedLiveAttributeValue,LiveAttributeValue,org.w3c.dom.svg.SVGAnimatedPathData
public class SVGOMAnimatedPathData extends AbstractSVGAnimatedValue implements org.w3c.dom.svg.SVGAnimatedPathData
This class is the implementation of theSVGAnimatedPathDatainterface.- Version:
- $Id: SVGOMAnimatedPathData.java 1831635 2018-05-15 13:33:47Z ssteiner $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSVGOMAnimatedPathData.AnimSVGPathSegListSVGPathSegListimplementation for the animated path data value.classSVGOMAnimatedPathData.BaseSVGPathSegListSVGPathSegListimplementation for the base path data value.classSVGOMAnimatedPathData.NormalizedBaseSVGPathSegListSVGPathSegListimplementation for the normalized version of the base path data value.
-
Field Summary
Fields Modifier and Type Field Description protected SVGOMAnimatedPathData.AnimSVGPathSegListanimPathSegsThe animated path data value.protected booleanchangingWhether the list is changing.protected java.lang.StringdefaultValueDefault value for the 'd' attribute.protected SVGOMAnimatedPathData.NormalizedBaseSVGPathSegListnormalizedPathSegsThe normalized base path data value.protected SVGOMAnimatedPathData.BaseSVGPathSegListpathSegsThe base path data value.-
Fields inherited from class org.apache.batik.anim.dom.AbstractSVGAnimatedValue
element, hasAnimVal, listeners, localName, namespaceURI
-
-
Constructor Summary
Constructors Constructor Description SVGOMAnimatedPathData(AbstractElement elt, java.lang.String ns, java.lang.String ln, java.lang.String defaultValue)Creates a new SVGOMAnimatedPathData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattrAdded(org.w3c.dom.Attr node, java.lang.String newv)Called when an Attr node has been added.voidattrModified(org.w3c.dom.Attr node, java.lang.String oldv, java.lang.String newv)Called when an Attr node has been modified.voidattrRemoved(org.w3c.dom.Attr node, java.lang.String oldv)Called when an Attr node has been removed.voidcheck()Throws an exception if the path data is malformed.org.w3c.dom.svg.SVGPathSegListgetAnimatedNormalizedPathSegList()DOM: ImplementsSVGAnimatedPathData.getAnimatedNormalizedPathSegList().org.w3c.dom.svg.SVGPathSegListgetAnimatedPathSegList()DOM: ImplementsSVGAnimatedPathData.getAnimatedPathSegList().org.w3c.dom.svg.SVGPathSegListgetNormalizedPathSegList()DOM: ImplementsSVGAnimatedPathData.getNormalizedPathSegList().org.w3c.dom.svg.SVGPathSegListgetPathSegList()DOM: ImplementsSVGAnimatedPathData.getPathSegList().AnimatableValuegetUnderlyingValue(AnimationTarget target)Returns the base value of the attribute as anAnimatableValue.protected voidupdateAnimatedValue(AnimatableValue val)Updates the animated value with the givenAnimatableValue.-
Methods inherited from class org.apache.batik.anim.dom.AbstractSVGAnimatedValue
addAnimatedAttributeListener, fireAnimatedAttributeListeners, fireBaseAttributeListeners, getLocalName, getNamespaceURI, isSpecified, removeAnimatedAttributeListener
-
-
-
-
Field Detail
-
changing
protected boolean changing
Whether the list is changing.
-
pathSegs
protected SVGOMAnimatedPathData.BaseSVGPathSegList pathSegs
The base path data value.
-
normalizedPathSegs
protected SVGOMAnimatedPathData.NormalizedBaseSVGPathSegList normalizedPathSegs
The normalized base path data value.
-
animPathSegs
protected SVGOMAnimatedPathData.AnimSVGPathSegList animPathSegs
The animated path data value.
-
defaultValue
protected java.lang.String defaultValue
Default value for the 'd' attribute.
-
-
Constructor Detail
-
SVGOMAnimatedPathData
public SVGOMAnimatedPathData(AbstractElement elt, java.lang.String ns, java.lang.String ln, java.lang.String defaultValue)
Creates a new SVGOMAnimatedPathData.- Parameters:
elt- The associated element.ns- The attribute's namespace URI.ln- The attribute's local name.defaultValue- The default value if the attribute is not specified.
-
-
Method Detail
-
getAnimatedNormalizedPathSegList
public org.w3c.dom.svg.SVGPathSegList getAnimatedNormalizedPathSegList()
DOM: ImplementsSVGAnimatedPathData.getAnimatedNormalizedPathSegList().- Specified by:
getAnimatedNormalizedPathSegListin interfaceorg.w3c.dom.svg.SVGAnimatedPathData
-
getAnimatedPathSegList
public org.w3c.dom.svg.SVGPathSegList getAnimatedPathSegList()
DOM: ImplementsSVGAnimatedPathData.getAnimatedPathSegList().- Specified by:
getAnimatedPathSegListin interfaceorg.w3c.dom.svg.SVGAnimatedPathData
-
getNormalizedPathSegList
public org.w3c.dom.svg.SVGPathSegList getNormalizedPathSegList()
DOM: ImplementsSVGAnimatedPathData.getNormalizedPathSegList().Returns the SVGPathSegList mapping the normalized static 'd' attribute of the element.
A normalized path is composed only of absolute moveto, lineto and cubicto path segments (M, L and C). Using this subset, the path description can be represented with fewer segment types. Be aware that the normalized 'd' attribute will be a larger String that the original.
Relative values are transformed into absolute, quadratic curves are promoted to cubic curves, and arcs are converted into one or more cubic curves (one per quadrant).
Modifications to the normalized SVGPathSegList will result in substituting the original path with a set of normalized path segments.
- Specified by:
getNormalizedPathSegListin interfaceorg.w3c.dom.svg.SVGAnimatedPathData- Returns:
- a path segment list containing the normalized version of the path.
-
getPathSegList
public org.w3c.dom.svg.SVGPathSegList getPathSegList()
DOM: ImplementsSVGAnimatedPathData.getPathSegList().- Specified by:
getPathSegListin interfaceorg.w3c.dom.svg.SVGAnimatedPathData
-
check
public void check()
Throws an exception if the path data is malformed.
-
getUnderlyingValue
public AnimatableValue getUnderlyingValue(AnimationTarget target)
Returns the base value of the attribute as anAnimatableValue.- Specified by:
getUnderlyingValuein interfaceAnimatedLiveAttributeValue
-
updateAnimatedValue
protected void updateAnimatedValue(AnimatableValue val)
Updates the animated value with the givenAnimatableValue.- Specified by:
updateAnimatedValuein classAbstractSVGAnimatedValue
-
attrAdded
public void attrAdded(org.w3c.dom.Attr node, java.lang.String newv)Called when an Attr node has been added.- Specified by:
attrAddedin interfaceLiveAttributeValue
-
attrModified
public void attrModified(org.w3c.dom.Attr node, java.lang.String oldv, java.lang.String newv)Called when an Attr node has been modified.- Specified by:
attrModifiedin interfaceLiveAttributeValue
-
attrRemoved
public void attrRemoved(org.w3c.dom.Attr node, java.lang.String oldv)Called when an Attr node has been removed.- Specified by:
attrRemovedin interfaceLiveAttributeValue
-
-