Focus Attribute | Internet Development Index |
Defines the center of a linear gradient fill. Read/write VgFraction.
Applies To
Tag Syntax
<v: element focus="expression">
Script Syntax
element.focus="expression"
expression=element.focus
Remarks
Defines the center starting position of the blend. Values range from 100% to -100%. The default value is 0. A value of 100% (or -100%) will shift the focus so that the direction of the blend will reverse (in effect reversing Color and Color2). A value of 50% will change the blend so that Color is at both ends and Color2 is in the middle. A value of -50% will change the blend so that Color2 is at both ends and Color is in the middle.
VML Standard Attribute
Example
The gradient focus of the fill is shifted so that red (Color) will be a band in the center of the shape and that the top and bottom will be blue (Color2 ).
<v:shape id="rect01" coordorigin="0 0" coordsize="200 200" strokecolor="red" style="top:1;left:1;width:50;height:50" path="m 1,1 l 1,200, 200,200, 200,1 x e"> <v:fill type="gradient" color="red" color2="blue" method="linear" focus="-50%"/> </v:shape>