<f>
(Single Formula)
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 (§6.1.2.19)), the results of earlier formulas, 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".
<v:shape coordsize="21600,21600" adj="18000,5400,10800" path="m @0,0 l @0,@1 0,@1 0,@3 @0,@3 @0,21600 21600,10800 x e" style='left:50pt;top:50pt;width:90pt;height:30pt' fillcolor="#4f81bd" strokecolor="#4f81bd" strokeweight="2pt"> <v:formulas> <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"/> </v:formulas> </v:shape>
The shape looks like this:
Parent Elements |
---|
|
Attributes |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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 formulas 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 formulas 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 formulas which is discontinuous evaluates to give very different path 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 entry in the shape
The EMU, or English Metric Unit, is the smallest unit of measure in VML and corresponds to 914400 EMU per inch or 12700 EMU per point. 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:
<complexType name="CT_F">
<attribute name="eqn" type="xsd:string"/>
</complexType>