Creates a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and orientation.
[Visual Basic]
Public Sub New( _
ByVal rect As Rectangle, _
ByVal color1 As Color, _
ByVal color2 As Color, _
ByVal linearGradientMode As LinearGradientMode _
)
[C#]
public LinearGradientBrush(
Rectangle rect,
Color color1,
Color color2,
LinearGradientMode linearGradientMode
);
[C++]
public: LinearGradientBrush(
Rectangle rect,
Color color1,
Color color2,
LinearGradientMode linearGradientMode
);
[JScript]
public function LinearGradientBrush(
rect : Rectangle,
color1 : Color,
color2 : Color,
linearGradientMode : LinearGradientMode
);
Parameters
- rect
- A Rectangle structure that specifies the bounds of the linear gradient.
- color1
- A Color structure that represents the starting color for the gradient.
- color2
- A Color structure that represents the ending color for the gradient.
- linearGradientMode
- A LinearGradientMode enumeration element that specifies the orientation of the gradient. The orientation determines the starting and ending points of the gradient. For example, LinearGradientMode.ForwardDiagonal specifies that the starting point is the upper-left corner of the rectangle and the ending point is the lower-right corner of the rectangle.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
LinearGradientBrush Class | LinearGradientBrush Members | System.Drawing.Drawing2D Namespace | LinearGradientBrush Constructor Overload List