Class LinearGradientBrush
Represents a brush that paints a gradient between multiple colors.
public class LinearGradientBrush : Brush
- Inheritance
-
LinearGradientBrush
- Inherited Members
- Extension Methods
Constructors
LinearGradientBrush(Color[], Rectangle)
Represents a brush that paints a gradient between multiple colors.
public LinearGradientBrush(Color[] linearColors, Rectangle rectangle)
Parameters
linearColors
Color[]An array of colors defining the gradient stops.
rectangle
RectangleThe rectangle that defines the bounds of the gradient.
LinearGradientBrush(Point, Point, Color, Color)
Initializes a new instance of the LinearGradientBrush class using two points and two colors.
public LinearGradientBrush(Point stop0, Point stop1, Color color0, Color color1)
Parameters
stop0
PointThe first point of the gradient.
stop1
PointThe second point of the gradient.
color0
ColorThe color at the first point.
color1
ColorThe color at the second point.
Properties
LinearColors
Gets the array of colors defining the gradient stops.
public Color[] LinearColors { get; }
Property Value
- Color[]
Rectangle
Gets the rectangle that defines the bounds of the gradient.
public Rectangle Rectangle { get; }