[Table of Contents] [docx version]
VML Reference Material - VML
This element defines a single value as the result of the evaluation of an expression. The expression is defined by the eqn attribute and has the general form of an operation followed by up to three arguments, which consist of adjustment values (see the adj attribute of the shape element (§188.8.131.52)), the results of earlier , fixed numbers or pre-defined values. Each f value is referenced using "@" followed by a number corresponding to the zero-based index for that value in the list of f elements. For example, the value of the second f element is referenced as "@2".
[Example: The following defines a blue arrow pointing to the right:
fillcolor="#4f81bd" strokecolor="#4f81bd" strokeweight="2pt">
<v:f eqn="val #0"/>
<v:f eqn="val #1"/>
<v:f eqn="val #2"/>
<v:f eqn="sum height 0 #1"/>
<v:f eqn="sum #2 0 #1"/>
<v:f eqn="sum width 0 #0"/>
<v:f eqn="prod @5 @4 #2"/>
<v:f eqn="sum width 0 @6"/>
The shape looks like this:
Specifies a single formula, which consists of a named operation followed by up to three parameters, typically described as v, P1 and P2. Up to 128 may be specified. These operations are defined (calculation accuracy is discussed below):
Formulas are evaluated to full precision, but the result is always a 32-bit integer. Formula authors should avoid which are discontinuous - not only are many of the trigonometric operations inexact, the transformations within the coordinate spaces are also inexact. This can mean that a set of which is discontinuous evaluates to give very different values with the same input on two different systems.
When an operation is marked as exact then a conforming implementation must always generate the correct arithmetic answer (unless the calculations overflow internally). The product operation is required to round to the nearest integer. If the result is exactly 0.5 then it must be rounded up to the next numerically greater integer. The mid operation is required to round towards 0.
All other operations are inexact, but the implementation must round non-integral values down (towards -infinity) and should perform internal calculations with this form of rounding.
The arguments used in the evaluation of a formula are normally either fixed numbers, the result of the evaluation of a previous formula or an adjust value - the value of the corresponding in the shape adj attribute. Fixed numbers must be positive integral values in the range 0 to 65535 (unsigned 16-bit numbers). The following named values are defined:
See above for an example.
The possible values for this attribute are defined by the XML Schema string datatype.
The following XML Schema fragment defines the contents of this element:
<attribute name="eqn" type="xsd:string"/>