FocusPosition Attribute

HTML (DHTML)

FocusPosition Attribute

Internet Development Index

Defines the center of a radial gradient. Read/write VgVector2D.

Applies To

Fill

Tag Syntax

<v: element focusposition="expression">

Script Syntax

element.focusposition="expression"

expression=element.focusposition

Remarks

Specifies the center position for radial gradients. The vector is a fraction of the width and height of the shape. The first is a percentage of the fill to the left edge; the second is a percentage of the fill to the top. The default value is 0,0. To position a radial fill at the center of a shape, use the value of 50%,50%.

VML Standard Attribute

Example

The radial fill will be centered so that blue will start in the center and radiate outward, gradually changing to red by the time it reaches the outside edges and corners.

   <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="GradientRadial" color="red" color2="blue"
   focusposition="50%,50%"/>
   </v:shape>