Partager via


TimeAnimateValue.Fomula Property

Formula.Represents the attribte in schema: fmla

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

Syntax

'Declaration
<SchemaAttrAttribute(, "fmla")> _
Public Property Fomula As StringValue
    Get
    Set
'Usage
Dim instance As TimeAnimateValue
Dim value As StringValue

value = instance.Fomula

instance.Fomula = value
[SchemaAttrAttribute(, "fmla")]
public StringValue Fomula { get; set; }

Property Value

Type: DocumentFormat.OpenXml.StringValue
Returns StringValue.

Remarks

The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

This attribute allows for a specific formula to be used during the animation. This is specified in a semicolon-separated list of formulas. The value generated by interpolating the values list will be fed into the formula as an input. The resulting value is used to set the property being animated. There should be n-1 number of formulas for n values in the values list. The formula is applied starting at the corresponding time in the keyTimes list and up to the next time in the list.

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 will be assumed.

Formulas must be written using the elements defined below. When a formula is used in an attribute that takes more than one parameter (such as for animateScale or animateMotion), a space will be taken as a delimiter between parameter values. To work around this, either don't put spaces in the formula or include parentheses around the formula.

Formulas within values, from, to, by attributes can be made up of these:

  • Standard arithmetic operators: ‘+’, ‘-‘, ‘*’, ‘/’, ‘^’, ‘%’ (mod)

  • Constants: ‘pi’ ‘e’

  • Conditional operators: ‘abs’, ‘min’, ‘max’, ‘?’ (if)

  • Comparison operators: '==', '>=', '<=', '!=', '!'

  • Trigonometric operators: ‘sin()’, ‘cos()’, ‘tan()’, ‘asin()’, ‘acos()’, ‘atan()’

  • Natural logarithm ‘ln()’

  • Property references (host supported properties)

The above formula elements are different than those used in javascript expressions. For example "cos()" used in formulas would be "Math.cos()" in javascript.

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

See Also

Reference

TimeAnimateValue Class

TimeAnimateValue Members

DocumentFormat.OpenXml.Presentation Namespace