TcxCustomCanvas.FillRectByGradient(TRect,TdxAlphaColor,TdxAlphaColor,TdxGpLinearGradientMode) Method
Draws a rectangle filled with a linear gradient.
Declaration
procedure FillRectByGradient(const R: TRect; AColor1: TdxAlphaColor; AColor2: TdxAlphaColor; AMode: TdxGpLinearGradientMode); overload;
Parameters
| Name | Type |
|---|---|
| R | TRect |
| AColor1 | TdxAlphaColor |
| AColor2 | TdxAlphaColor |
| AMode | TdxGpLinearGradientMode |
Remarks
Call either of the overloaded procedure variants and pass a rectangle as the ARect parameter to fill the rectangle with a linear gradient. Pass two colors as the AColor1 and AColor2 parameters to define the start and end gradient points.
The first overloaded FillRectByGradient procedure accepts TColor values as two gradient points and fills the resulting rectangle with a non-transparent gradient. Pass True or False as the AHorizontal parameter to choose between horizontal and vertical linear gradients.
The second overloaded variant accepts TdxAlphaColor values instead of TColor values, and fills the resulting rectangle with a transparent gradient. This variant also has two diagonal gradient directions, in addition to the options available for the first FillRectByGradient procedure variant. Refer to the LinearGradientMode type description for more details.