Class LinearGradientFill
Class represents the linear gradient fill.
Inherited Members
Namespace: FastReport
Assembly: FastReport.Base.dll
Syntax
public class LinearGradientFill : FillBase
Constructors
LinearGradientFill()
Initializes the LinearGradientFill class with default settings.
Declaration
public LinearGradientFill()
LinearGradientFill(Color, Color)
Initializes the LinearGradientFill class with start and end colors.
Declaration
public LinearGradientFill(Color startColor, Color endColor)
Parameters
Type | Name | Description |
---|---|---|
Color | startColor | Start color. |
Color | endColor | End color. |
LinearGradientFill(Color, Color, Int32)
Initializes the LinearGradientFill class with start, end colors and angle.
Declaration
public LinearGradientFill(Color startColor, Color endColor, int angle)
Parameters
Type | Name | Description |
---|---|---|
Color | startColor | Start color. |
Color | endColor | End color. |
System.Int32 | angle | Angle. |
LinearGradientFill(Color, Color, Int32, Single, Single)
Initializes the LinearGradientFill class with start and end colors, angle, focus and contrast.
Declaration
public LinearGradientFill(Color startColor, Color endColor, int angle, float focus, float contrast)
Parameters
Type | Name | Description |
---|---|---|
Color | startColor | Start color. |
Color | endColor | End color. |
System.Int32 | angle | Angle. |
System.Single | focus | Focus. |
System.Single | contrast | Contrast. |
Properties
Angle
Gets or sets the angle of the gradient.
Declaration
public int Angle { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Contrast
Gets or sets the gradient contrast.
Declaration
public float Contrast { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Value is a floating point value from 0 to 1.
EndColor
Gets or sets the end color of the gradient.
Declaration
public Color EndColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Focus
Gets or sets the focus point of the gradient.
Declaration
public float Focus { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Value is a floating point value from 0 to 1.
IsTransparent
Declaration
public override bool IsTransparent { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
StartColor
Gets or sets the start color of the gradient.
Declaration
public Color StartColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Methods
Clone()
Declaration
public override FillBase Clone()
Returns
Type | Description |
---|---|
FillBase |
Overrides
CreateBrush(RectangleF)
Declaration
public override Brush CreateBrush(RectangleF rect)
Parameters
Type | Name | Description |
---|---|---|
RectangleF | rect |
Returns
Type | Description |
---|---|
Brush |
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
Serialize(FRWriter, String, FillBase)
Declaration
public override void Serialize(FRWriter writer, string prefix, FillBase fill)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer | |
System.String | prefix | |
FillBase | fill |