TGML Animation

<Animate> animates a specified attribute of the immediate parent element.

Attribute Type Description

Animation

Animation

Starts and stops the animation in Dynamic mode.
Default: "Start"
Inheritable: No
Animatable: Yes

Attribute

String

The animated attribute of the parent element.
Default: "0.5 , 0.5"
Inheritable: No
Animatable: No

AutoReverse

Bool

Indicates whether the timeline plays in reverse after it completes a forward iteration.
Default: "False"
Inheritable: No
Animatable: Yes

CalcMode

CalcMode

Specifies how values are interpolated. See Remarks.
Default: "Discrete"
Inheritable: No
Animatable: Yes

Duration

Double

Specifies the "simple duration" of the animation measured in seconds.
Inheritable: No
Animatable: Yes

Freeze

Bool

Specifies if the animated attribute value is kept or not when the animation ends (end of "active duration" or stopped by setting Animation to Stop).
Default: "False"
Inheritable: No
Animatable: Yes

From

String (untyped)

The starting value of an animation. The type is determined by the referenced Attribute.
Inheritable: Yes
Animatable: Yes

Repeat

Repeat

Describes the way the animation is repeated.
Default: "Forever"
Inheritable: No
Animatable: Yes

To

String (untyped)

The ending value of the animation. The type is determined by the referenced Attribute.
Inheritable: Yes
Animatable: Yes

Different CalcMode values:

Example of TGML code containing an Animate element that performs a blink:

Copy
<TGML>
    <Polygon Points="50.0,50.0 150.0,50.0 150.0,150.0 50.0,150.0" Stroke="#000000" Fill="#FF0000">
        <Animate Attribute="Visibility" From="Visible" Tc="Hidden" Duration="l.0" AutoReverse="True" />
</TGML>