Partager via


TimeAnimateValue Class

Time Animate Value.When the object is serialized out as xml, its qualified name is p:tav.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Presentation.TimeAnimateValue

Namespace:  DocumentFormat.OpenXml.Presentation
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(VariantValue))> _
Public Class TimeAnimateValue _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TimeAnimateValue
[ChildElementInfoAttribute(typeof(VariantValue))]
public class TimeAnimateValue : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • VariantValue <p:val>

[ISO/IEC 29500-1 1st Edition]

19.5.79 tav (Time Animate Value)

This element defines a "keypoint" in animation interpolation.

[Example: Consider a shape with a "fly-in" animation. The <tav> element should be used as follows:

<p:anim calcmode="lin" valueType="num">
  <p:cBhvr additive="base"> … </p:cBhvr>
  <p:tavLst>
    <p:tav tm="0">
      <p:val>
        <p:strVal val="1+#ppt_h/2"/>
      </p:val>
    </p:tav>
    <p:tav tm="100000">
      <p:val>
        <p:strVal val="#ppt_y"/>
      </p:val>
    </p:tav>
  </p:tavLst>
</p:anim>

end example]

Parent Elements

tavLst (§19.5.80)

Child Elements

Subclause

val (Value)

§19.5.92

Attributes

Description

fmla (Formula)

This attribute allows for the specification of a formula to be used for describing a complex motion for an animated object. The formula manipulates the motion of the object by modifying a property of the object over a specified period of time. Each formula has zero or more inputs specified by the ($) symbol, zero or more variables specified by the (#) symbol pre-pended to the variable name and a target variable which is specified by the previously specified attrName element. The formula can contain one or more of any of the constants, operators or functions listed below. In addition to this, the formula can also contain floating point numbers and parentheses.

Mathematical operations have the following order of precedence, listed from lowest to highest. Operators listed on the same line have equal precedence.

  • “+”, “-“

  • “*”, “/”, “%”

  • “^”

  • Unary minus, Unary plus (e.g. -2, meaning 3*-2 is the same as 3*(-2))

  • Variables, Constants (including numbers) and Functions (as listed previously)

Language Description:

Digit    = '0' | '1' | ‘2’ | ‘3’ | ‘4’ | ‘5’ | ‘6’ | ‘7’
| ‘8’ | '9' ;
number   = digit , { digit } ;
exponent = [ '-' ] , ( 'e' | 'E' ) , number ;
value    = number , [ '.' number ] , [ exponent ] ;
variable = '$' | 'ppt_x' | 'ppt_y' | 'ppt_w' | 'ppt_h' ;
constant = value | 'pi' | 'e' ;
ident    = 'abs' | ‘acos’ | ‘asin’ | ‘atan’ | ‘ceil’
| ‘cos’ | ‘cosh’ | ‘deg’ | ‘exp’ | ‘floor’ | ‘ln’
| ‘max’ | ‘min’ | ‘rad’ | ‘rand’ | ‘sin’ | ‘sinh’
| ‘sqrt’ | ‘tan’ | 'tanh' ;
function = ident , '(' , formula [ ',' , formula ] , ')' ;
formula  = term , { [ '+' | '-' ] , term } ;
term     = power , { [ '*' | '/' | '%' ] , power } ;
power    = unary [ '^' , unary ] ;
unary    = [ '+' | '-' ] , factor ;
factor   = variable | constant | function | parens ;
parens   = '(' , formula , ')' ;

[Note: Formulas can only support a calcMode (Calculation Mode) of linear or discrete. If another calcMode is specified or no calcMode is specified then a calcMode of linear is assumed. end note]

[Note: Any additional characters in the formula string that are not contained within the set described are considered invalid. end note]

Variables:

Name

Description

$

Formula input

ppt_x

Pre-animation x position of the object on the slide

ppt_y

Pre-animation y position of the object on the slide

ppt_w

Pre-animation width of the object

ppt_h

Pre-animation height of the object

Constants:

Name

Description

pi

Mathematical constant pi

e

Mathematical constant e

Operators:

Name

Description

Usage

+

Addition

“x+y”, adds x to the value y

-

Subtraction

“x-y”, subtracts y from the value x

*

Multiplication

“x*y”, multiplies x by the value y

/

Division

“x/y”, divides x by the value y

%

Modulus

“x%y”, the remainder of x/y

^

Power

“x^y”, x raised to the power y

Functions:

Name

Description

Usage

abs

Absolute value

“abs(x)”, absolute value of x

acos

Arc Cosine

“acos(x)”, arc cosine of the value x

asin

Arc Sine

“asin(x)”, arc sine of the value x

atan

Arc Tangent

“atan(x)”, arc tangent of the value x

ceil

Ceil value

“ceil(x)”, value of x rounded up

cos

Cosine

“cos(x)”, cosine of the value of x

cosh

Hyperbolic Cosine

“cosh(x)", hyperbolic cosine of the value x

deg

Radiant to Degree convert

“deg(x)”, the degree value of radiant value x

exp

Exponent

“exp(x)”, value of constant e raised to the power of x

floor

Floor value

“floor(x)”, value of x rounded down

ln

Natural logarithm

“ln(x)”, natural logarithm of x

max

Maximum of two values

“max(x,y)”, returns x if (x > y) or returns y if (y > x)

min

Minimum of two values

“min(x,y)", returns x if (x < y) or returns y if (y < x)

rad

Degree to Radiant convert

“rad(x)”, the radiant value of degree value x

rand

Random value

“rand(x)”, returns a random floating point value between 0 and x

sin

Sine

“sin(x)”, sine of the value x

sinh

Hyperbolic Sine

"sinh(x)”, hyperbolic sine of the value x

sqrt

Square root

“sqrt(x)”, square root of the value x

tan

Tangent

“tan(x)”, tangent of the value x

tanh

Hyperbolic Tangent

“tanh(x)", hyperbolic tangent of the value x

[Example: Consider the following animation path:

<p:animcalcmode="lin" valueType="num">
  <p:cBhvr>
    <p:cTn id="9" dur="664" tmFilter="0.0,0.0; 0.25,0.07;         0.50,0.2; 0.75,0.467; 1.0,1.0">
      <p:stCondLst>
        <p:cond delay="0"/>
      </p:stCondLst>
    </p:cTn>
    <p:tgtEl>
      <p:spTgtspid="4"/>
    </p:tgtEl>
    <p:attrNameLst>
      <p:attrName>ppt_y</p:attrName>
    </p:attrNameLst>
  </p:cBhvr>
  <p:tavLst>
    <p:tav tm=”0” fmla=”#ppt_y-sin(pi*$)/3">
      <p:val>
        <p:fltValval="0.5"/>
      </p:val>
    </p:tav>
    <p:tav tm="100000">
      <p:val>
        <p:fltValval="1"/>
      </p:val>
    </p:tav>
  </p:tavLst>
</p:anim>

The animation example above modifies the ppt_y variable of the object by subtracting sin(pi*$)/3 from the non-animated value of ppt_y. The start value is 0.5 and the end value is 1 specified in each of the val elements. The total time for this animation is specified within the dur attribute and the filtered time graph is specified by the tmFilter attribute. The end result is that the object moves from a point above its non-animated position back to its non-animated position. With the specification of the tmFilter it has a modified time graph such that it also appears to accelerate as it reaches its final position.

[Note: For this example, the non-animated value of ppt_y is the value of this variable if the object were to be statically rendered on the slide without animation properties. end note]

end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

tm (Time)

This attribute specifies the time at which the attribute being animated takes on the value.

The possible values for this attribute are defined by the ST_TLTimeAnimateValueTime simple type (§19.7.39).

[Note: The W3C XML Schema definition of this element’s content model (CT_TLTimeAnimateValue) is located in §A.3. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

TimeAnimateValue Members

DocumentFormat.OpenXml.Presentation Namespace