Table of Contents

Method FillGradient

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

FillGradient(RectD, Color, Color, PointD, PointD)

Fills the specified rectangle with a linear gradient defined by the given colors and points.

public virtual void FillGradient(RectD rect, Color beginColor, Color endColor, PointD point1, PointD point2)

Parameters

rect RectD

The rectangle to fill with the gradient.

beginColor Color

The starting color of the gradient.

endColor Color

The ending color of the gradient.

point1 PointD

The starting point of the gradient.

point2 PointD

The ending point of the gradient.

Remarks

The gradient is defined by a line connecting point1 and point2, transitioning from beginColor to endColor. The gradient is applied to the entire area of the specified rectangle.