TinyLine
v2.0

com.tinyline.svg
Class SVGAnimationElem

java.lang.Object
  extended bycom.tinyline.svg.SVGNode
      extended bycom.tinyline.svg.SVGAnimationElem

public class SVGAnimationElem
extends SVGNode

The SVGAnimationElem class implements animation elements which are defined in SMIL Animation and 3GPP SMIL Language Profile specifications.

The 3GPP SMIL timing modules includes BasicInlineTiming, MinMaxTiming, BasicTimeContainers, RepeatTiming and EventTiming.

For 'begin' and 'end' attributes either single offset-value or single event-value shall be allowed. Offsets shall not be supported with event-values.

Event timing attributes that reference invalid IDs (for example elements that have been removed by the content control) shall be treated as being indefinite.

Supported event names and semantics shall be as defined by the SMIL 2.0 Language Profile. All user agents shall be able to raise the following event types:

Version:
1.9

Author:
Andrew Girow

Field Summary
 int accumulate
          Controls whether or not the animation is cumulative.
 int additive
          Controls whether or not the animation is additive.
 int attributeName
          Specifies the name of the target attribute.
 SMILTime begin
          Defines when the element should begin (i.e.
static int BEGIN_EVENT
          This event is raised when the element local timeline begins to play.
 int calcMode
          Specifies the interpolation mode for the animation.
 SMILTime dur
          Specifies the simple duration.
 SMILTime end
          Defines an end value for the animation that can constrain the active duration.
static int END_EVENT
          This event is raised at the active end of the element.
 int fillType
          Specifies the animation effect.
 TinyVector keyPoints
          TinyNumber values between 0 and 1 indicate how far along the motion path the object shall move.
 TinyVector keySplines
          A set of Bézier control points (TinyPaths) associated with the keyTimes list
 TinyVector keyTimes
          A semicolon-separated list of time values used to control the pacing of the animation.
 SMILTime max
          Specifies the maximum value of the active duration dur = (Clock-value | 'media' | 'indefinite')
 SMILTime min
          Specifies the minimum value of the active duration dur = (Clock-value | 'media' | 'indefinite')
 int origin
          The origin attribute is defined in the SMIL Animation specification [SMILANIM-ATTR-ORIGIN].
 TinyPath path
          Specifies the curve that describes the attribute value as a function of time.
static int REPEAT_EVENT
          This event is raised when the element local timeline repeats.
 int repeatCount
          Specifies the number of iterations of the animation function.
 SMILTime repeatDur
          Specifies the total duration for repeat.
 int restart
          Defines when the element should restart.
 int rotate
          The rotate attribute adds a supplemental transformation.
 TinyString sby
          Specifies a relative offset value for the animation.
 TinyString sfrom
          Specifies the starting value of the animation.
 TinyString sto
          Specifies the ending value of the animation.
 TinyVector svalues
          A semicolon-separated list of one or more TinyString values.
 int transformType
          Indicates the type of transformation which is to have its values change over time.
 TinyString xlink_href
          The URI reference to the element which is the target of this animation and which therefore will be modified over time.
 
Fields inherited from class com.tinyline.svg.SVGNode
animatedVals, bounds, children, color, display, fill, fillOpacity, fillRule, fontFamily, fontSize, fontStyle, fontWeight, helem, id, opacity, outlined, ownerDocument, parent, stopColor, stopOpacity, stroke, strokeDashArray, strokeDashOffset, strokeLineCap, strokeLineJoin, strokeMiterLimit, strokeOpacity, strokeWidth, textAnchor, transform, visibility, xmlSpace
 
Constructor Summary
SVGAnimationElem()
          Constructs a new SVGAnimationElem object.
SVGAnimationElem(SVGAnimationElem src)
          Creates a copy of the given SVGAnimationElem object.
 
Method Summary
 boolean beginElementAt(int offset)
          Causes this SVGAnimationElem to begin the local timeline.
 SVGNode copyNode()
          Constructs a copy of the given node.
 int createOutline()
          Creates an outline of this node.
 boolean endElementAt(int offset)
          Causes this SVGAnimationElem to end the local timeline.
 java.lang.Object getAttribute(int hattr)
          Returns the value object for the given attribute, or null object otherwise.
 TinyRect getBounds()
          Returns the user bounding box for this SVGNode.
 void paint(SVGRaster renderer)
          Draws this node.
 int setAttribute(int hattr, java.lang.Object value)
          Assigns or modifies the value of the specified attribute.
 
Methods inherited from class com.tinyline.svg.SVGNode
addChild, contains, getCapStyle, getCurrentColor, getDashArray, getDashOffset, getDevBounds, getDisplay, getFillColor, getFillOpacity, getFillRule, getFontFamily, getFontSize, getGlobalTransform, getJoinStyle, getLineThickness, getMiterLimit, getNodeById, getOpacity, getStopColor, getStopOpacity, getStrokeColor, getStrokeOpacity, getTextAnchor, getVisibility, intersects, isDisplay, isVisible, matchUserAgent, nodeHitAt, removeChild, resolveColor, seekAElem
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xlink_href

public TinyString xlink_href
The URI reference to the element which is the target of this animation and which therefore will be modified over time.


attributeName

public int attributeName
Specifies the name of the target attribute.


additive

public int additive
Controls whether or not the animation is additive. additive = (replace | sum ) replace


accumulate

public int accumulate
Controls whether or not the animation is cumulative. accumulate = (none | sum) none


calcMode

public int calcMode
Specifies the interpolation mode for the animation. calcMode = ( discrete | linear | paced | spline ) 'linear'


svalues

public TinyVector svalues
A semicolon-separated list of one or more TinyString values.


keyTimes

public TinyVector keyTimes
A semicolon-separated list of time values used to control the pacing of the animation. Each time value in the keyTimes list is TinyNumber value between 0 and 1 (inclusive).


keySplines

public TinyVector keySplines
A set of Bézier control points (TinyPaths) associated with the keyTimes list


sfrom

public TinyString sfrom
Specifies the starting value of the animation.


sto

public TinyString sto
Specifies the ending value of the animation.


sby

public TinyString sby
Specifies a relative offset value for the animation.


begin

public SMILTime begin
Defines when the element should begin (i.e. become active).


dur

public SMILTime dur
Specifies the simple duration. dur = (Clock-value | 'media' | 'indefinite')


end

public SMILTime end
Defines an end value for the animation that can constrain the active duration.


min

public SMILTime min
Specifies the minimum value of the active duration dur = (Clock-value | 'media' | 'indefinite')


max

public SMILTime max
Specifies the maximum value of the active duration dur = (Clock-value | 'media' | 'indefinite')


restart

public int restart
Defines when the element should restart. restart = ( always | never | whenNotActive ) 'always'


repeatCount

public int repeatCount
Specifies the number of iterations of the animation function. repeatCount = ( numeric value | 'indefinite') 'indefinite' defined by -1 value.


repeatDur

public SMILTime repeatDur
Specifies the total duration for repeat. repeatDur = (Clock-value | 'indefinite')


fillType

public int fillType
Specifies the animation effect. fill = ( remove | freeze ) 'remove'


transformType

public int transformType
Indicates the type of transformation which is to have its values change over time. type ( translate | scale | rotate | skewX | skewY ) 'translate'


path

public TinyPath path
Specifies the curve that describes the attribute value as a function of time.


keyPoints

public TinyVector keyPoints
TinyNumber values between 0 and 1 indicate how far along the motion path the object shall move.


rotate

public int rotate
The rotate attribute adds a supplemental transformation. rotate = ( | auto | auto-reverse) 0 Here auto == TinyNumber.MIN_NUMBER auto-reverse == TinyNumber.MAX_NUMBER


origin

public int origin
The origin attribute is defined in the SMIL Animation specification [SMILANIM-ATTR-ORIGIN]. It has no effect in SVG.


BEGIN_EVENT

public static final int BEGIN_EVENT
This event is raised when the element local timeline begins to play.

See Also:
Constant Field Values

END_EVENT

public static final int END_EVENT
This event is raised at the active end of the element.

See Also:
Constant Field Values

REPEAT_EVENT

public static final int REPEAT_EVENT
This event is raised when the element local timeline repeats.

See Also:
Constant Field Values
Constructor Detail

SVGAnimationElem

public SVGAnimationElem()
Constructs a new SVGAnimationElem object. [1] http://www.w3.org/TR/2001/REC-smil-animation-20010904/#Timing-EvaluationOfBeginEndTimeLists


SVGAnimationElem

public SVGAnimationElem(SVGAnimationElem src)
Creates a copy of the given SVGAnimationElem object.

Parameters:
src - The source SVGAnimationElem object.
Method Detail

copyNode

public SVGNode copyNode()
Constructs a copy of the given node.

Specified by:
copyNode in class SVGNode

setAttribute

public int setAttribute(int hattr,
                        java.lang.Object value)
                 throws java.lang.Exception
Assigns or modifies the value of the specified attribute.

Overrides:
setAttribute in class SVGNode
Parameters:
hattr - The attribute handle.
value - The value of the attribute.
Returns:
The error code that could be one of the following: SVG.ERR_OK, SVG.ERR_NUMBER_FORMAT, SVG.ERR_INVALID_ARG, SVG.ERR_NOT_FOUND, SVG.ERR_NOT_SUPPORTED, SVG.ERR_HIERARCHY_REQUEST
Throws:
java.lang.Exception - if the value type doesn not match to the attribute handle.

getAttribute

public java.lang.Object getAttribute(int hattr)
Returns the value object for the given attribute, or null object otherwise.

Overrides:
getAttribute in class SVGNode
Parameters:
hattr - The attribute handle.
Returns:
The value of the attribute or null.

paint

public void paint(SVGRaster renderer)
Draws this node.

Specified by:
paint in class SVGNode
Parameters:
renderer - The SVGRaster object that does the drawing.

getBounds

public TinyRect getBounds()
Returns the user bounding box for this SVGNode. COORDINATES ARE IN USER SPACE. If this SVGNode doesnt have its own geometry, the getBounds() returns null.

Overrides:
getBounds in class SVGNode

createOutline

public int createOutline()
Creates an outline of this node.

Specified by:
createOutline in class SVGNode

beginElementAt

public boolean beginElementAt(int offset)
Causes this SVGAnimationElem to begin the local timeline.

Parameters:
offset - The offset in seconds at which to begin.
Returns:
True if the method call was successful and the SVGAnimationElem was begun. False owtherwise.

endElementAt

public boolean endElementAt(int offset)
Causes this SVGAnimationElem to end the local timeline.

Parameters:
offset - The offset in seconds at which to end.
Returns:
True if the method call was successful and the SVGAnimationElem was ended. False owtherwise.

TinyLine
v2.0

Provided under the terms of the TinyLine License Agreement that has been included with this distribution