Create(StatrColor: IGxColor; EndColor: IGxColor; Angle: Double; [Rect: IGxRect = Null]);
StatrColor. Gradient start color.
EndColor. Gradient end color.
Angle. Gradient angle.
Rect. Rectangle limiting gradient area. The rectangle is not specified by default, the linear gradient brush sized 100*100 pixels is created.
The Create method creates a new linear gradient brush in accordance with the specified parameters.
To execute the example, add a link to the Drawing system assembly.
Function GetLinearGradientBrush(StartColor: GxKnownColor; EndColor: GxKnownColor; Angle: Double): IGxLinearGradientBrush;
Var
SColor, EColor: IGxColor;
LGradientBrush: IGxLinearGradientBrush;
Begin
SColor := New GxColor.FromKnownColor(StartColor);
EColor := New GxColor.FromKnownColor(EndColor);
LGradientBrush := New GxLinearGradientBrush.Create(SColor, EColor, Angle);
Return LGradientBrush;
End Function GetLinearGradientBrush;
The function returns the linear gradient brush with the specified colors and gradient angle. The brush size is 100*100 pixels.
See also: