SetGradient Statement:
Select gradient
Object.SetGradient
x1, y1, x2, y2
|
Parameters:
x1,y1-gradient start coordinates
x2,y2-gradient end coordinates
|
Sample: object.SetGradient
50, 50, 100, 100
This method sets the gradient color. SetGradient method uses the color with 0 index as the first color and the color with 1 index as the last color of gradient fill. The colors are set with SetColor and SetColorIndex methods. The gradient can be used to draw graphic primitives, to fill figures, to draw text, etc. The brush fill takes precedence of gradient fill. Thus, if the brush data is set along with the gradient data, the brush fill will be used instead of the gradient fill. It’s possible to clear gradient data (cancel SetGradient call) with ClearGradient method.
See also
DrawFilledRectangle,DrawRectangle,SetColor,
SetLineWidth,SetGradient,ClearGradient,SetImageIndex,SetBrush,
ClearBrush
More samples:
|