LinearGradientBrush.LinearGradientBrush

LinearGradientBrush()

Initializes a new instance of the LinearGradientBrush class with default parameters. The starting color is black, the ending color is white, the angle is 45 degrees and the rectangle is located in (0,0) with size (1,1).

public LinearGradientBrush()

See Also


LinearGradientBrush(Point, Point, Color, Color)

Initializes a new instance of the LinearGradientBrush class with the specified points and colors.

public LinearGradientBrush(Point point1, Point point2, Color color1, Color color2)
ParameterTypeDescription
point1PointA Point structure that represents the starting point of the linear gradient.
point2PointA Point structure that represents the endpoint of the linear gradient.
color1ColorA Color structure that represents the starting color of the linear gradient.
color2ColorA Color structure that represents the ending color of the linear gradient.

See Also


LinearGradientBrush(PointF, PointF, Color, Color)

Initializes a new instance of the LinearGradientBrush class with the specified points and colors.

public LinearGradientBrush(PointF point1, PointF point2, Color color1, Color color2)
ParameterTypeDescription
point1PointFA PointF structure that represents the starting point of the linear gradient.
point2PointFA PointF structure that represents the endpoint of the linear gradient.
color1ColorA Color structure that represents the starting color of the linear gradient.
color2ColorA Color structure that represents the ending color of the linear gradient.

See Also


LinearGradientBrush(Rectangle, Color, Color, float)

Initializes a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.

public LinearGradientBrush(Rectangle rect, Color color1, Color color2, float angle)
ParameterTypeDescription
rectRectangleA RectangleF structure that specifies the bounds of the linear gradient.
color1ColorA Color structure that represents the starting color for the gradient.
color2ColorA Color structure that represents the ending color for the gradient.
angleSingleThe angle, measured in degrees clockwise from the x-axis, of the gradient’s orientation line.

See Also


LinearGradientBrush(RectangleF, Color, Color, float)

Initializes a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.

public LinearGradientBrush(RectangleF rect, Color color1, Color color2, float angle)
ParameterTypeDescription
rectRectangleFA RectangleF structure that specifies the bounds of the linear gradient.
color1ColorA Color structure that represents the starting color for the gradient.
color2ColorA Color structure that represents the ending color for the gradient.
angleSingleThe angle, measured in degrees clockwise from the x-axis, of the gradient’s orientation line.

See Also


LinearGradientBrush(Rectangle, Color, Color, float, bool)

Initializes a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.

public LinearGradientBrush(Rectangle rect, Color color1, Color color2, float angle, 
    bool isAngleScalable)
ParameterTypeDescription
rectRectangleA RectangleF structure that specifies the bounds of the linear gradient.
color1ColorA Color structure that represents the starting color for the gradient.
color2ColorA Color structure that represents the ending color for the gradient.
angleSingleThe angle, measured in degrees clockwise from the x-axis, of the gradient’s orientation line.
isAngleScalableBooleanif set to true the angle is changed during transformations with this LinearGradientBrush.

See Also


LinearGradientBrush(RectangleF, Color, Color, float, bool)

Initializes a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.

public LinearGradientBrush(RectangleF rect, Color color1, Color color2, float angle, 
    bool isAngleScalable)
ParameterTypeDescription
rectRectangleFA RectangleF structure that specifies the bounds of the linear gradient.
color1ColorA Color structure that represents the starting color for the gradient.
color2ColorA Color structure that represents the ending color for the gradient.
angleSingleThe angle, measured in degrees clockwise from the x-axis, of the gradient’s orientation line.
isAngleScalableBooleanif set to true the angle is changed during transformations with this LinearGradientBrush.

See Also