LinearGradientBrush Constructor (Rectangle, Color, Color, Single, Boolean)
Creates a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.
Assembly: System.Drawing (in System.Drawing.dll)
public: LinearGradientBrush( Rectangle rect, Color color1, Color color2, float angle, bool isAngleScaleable )
Parameters
- rect
-
Type:
System.Drawing::Rectangle
A Rectangle structure that specifies the bounds of the linear gradient.
- color1
-
Type:
System.Drawing::Color
A Color structure that represents the starting color for the gradient.
- color2
-
Type:
System.Drawing::Color
A Color structure that represents the ending color for the gradient.
- angle
-
Type:
System::Single
The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
- isAngleScaleable
-
Type:
System::Boolean
Set to true to specify that the angle is affected by the transform associated with this LinearGradientBrush; otherwise, false.
All points along any line perpendicular to the orientation line are the same color.
The starting line is perpendicular to the orientation line and passes through one of the corners of the rectangle. All points on the starting line are the starting color. Then ending line is perpendicular to the orientation line and passes through one of the corners of the rectangle. All points on the ending line are the ending color.
The angle of the orientation line determines which corners the starting and ending lines pass through. For example, if the angle is between 0 and 90 degrees, the starting line passes through the upper-left corner, and the ending line passes through the lower-right corner.
Available since 1.1