Class LinearMulticolorGradientBrush
Represents a Brush with linear gradient defined by multiple colors and appropriate positions. This class cannot be inherited.
public sealed class LinearMulticolorGradientBrush : LinearGradientBrushBase, IDisposable
- Inheritance
-
LinearMulticolorGradientBrush
- Implements
- Inherited Members
Constructors
LinearMulticolorGradientBrush()
Initializes a new instance of the LinearMulticolorGradientBrush 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 LinearMulticolorGradientBrush()
LinearMulticolorGradientBrush(Point, Point)
Initializes a new instance of the LinearMulticolorGradientBrush class with the specified points.
public LinearMulticolorGradientBrush(Point point1, Point point2)
Parameters
point1
PointA Point structure that represents the starting point of the linear gradient.
point2
PointA Point structure that represents the endpoint of the linear gradient.
LinearMulticolorGradientBrush(PointF, PointF)
Initializes a new instance of the LinearMulticolorGradientBrush class with the specified points.
public LinearMulticolorGradientBrush(PointF point1, PointF point2)
Parameters
point1
PointFA PointF structure that represents the starting point of the linear gradient.
point2
PointFA PointF structure that represents the endpoint of the linear gradient.
LinearMulticolorGradientBrush(Rectangle, float)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
public LinearMulticolorGradientBrush(Rectangle rect, float angle)
Parameters
rect
RectangleA RectangleF structure that specifies the bounds of the linear gradient.
angle
floatThe angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
LinearMulticolorGradientBrush(Rectangle, float, bool)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
public LinearMulticolorGradientBrush(Rectangle rect, float angle, bool isAngleScalable)
Parameters
rect
RectangleA RectangleF structure that specifies the bounds of the linear gradient.
angle
floatThe angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
isAngleScalable
boolif set to
true
the angle is changed during transformations with this LinearMulticolorGradientBrush.
LinearMulticolorGradientBrush(RectangleF, float)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
public LinearMulticolorGradientBrush(RectangleF rect, float angle)
Parameters
rect
RectangleFA RectangleF structure that specifies the bounds of the linear gradient.
angle
floatThe angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
LinearMulticolorGradientBrush(RectangleF, float, bool)
Initializes a new instance of the LinearMulticolorGradientBrush class based on a rectangle and an orientation angle.
public LinearMulticolorGradientBrush(RectangleF rect, float angle, bool isAngleScalable)
Parameters
rect
RectangleFA RectangleF structure that specifies the bounds of the linear gradient.
angle
floatThe angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
isAngleScalable
boolif set to
true
the angle is changed during transformations with this LinearMulticolorGradientBrush.
Properties
InterpolationColors
Gets or sets a ColorBlend that defines a multicolor linear gradient.
public ColorBlend InterpolationColors { get; set; }
Property Value
- ColorBlend
A ColorBlend that defines a multicolor linear gradient.