Skip to main content

TdxGPBrushGradientPoints.Add(Single,TdxAlphaColor) Method

Creates a new key point on the gradient line.

Declaration

function Add(AOffset: Single; AColor: TdxAlphaColor): Integer;

Parameters

Name Type
AOffset Single
AColor TdxAlphaColor

Returns

Type
Integer

Remarks

Invoke this procedure to specify a new key point by both its position and color as the AOffset and AColor parameters, respectively. Each call of the Add method increases the Count property value by one.

Similarly to the respective Offsets property, the AOffset parameter ranges from 0 to 1 (i.e., from the beginning to the end of the gradient line, whose direction is determined by the brush’s GradientMode property value).

Note

Since both the brush and its gradient points support transparency, they use the TdxAlphaColor instead of standard TColor as a color type.

See Also