SetGradientFill Method

Structured Graphics Control

Specifies a rectangular area to fill with a gradient. This method can be used with any closed shape.

Syntax

HTML<PARAM NAME="Line0001" VALUE="SetGradientFill( startX, startY, finishX, finishY, strength )">
ScriptingSGObj.SetGradientFill( startX, startY, finishX, finishY, strength )
FileSetGradientFill( startX, startY, finishX, finishY, strength )

Parameters

startX, startY
The x and y positions, in pixels, for the start point of the rectangle that holds the gradient. These positions are relative to the upper-left corner of the page.
finishX, finishY
The x and y positions, in pixels, for the end point of the rectangle that holds the gradient. These positions are relative to the upper-left corner of the page.
strength
Sets the intensity of the first color.

Remarks

Use the SetFillColor method to specify the foreground and background colors for the gradient fill.

Use SetGradientFill method only if you specified type as 11 for the SetFillStyle method.

Example

The following example sets the gradient fill attributes for the shape to start at (25,15), to fill toward the upper-left corner of the page with a color intensity of 1.

<PARAM NAME="Line0005" VALUE="SetGradientFill(25,15,0,0,1)">

Right-click inside the frame and choose View Source to see the HTML code for this example.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.