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()
Creates exact copy of this fill.
Declaration
public override FillBase Clone()
Returns
Type | Description |
---|---|
FillBase | Copy of this object. |
Overrides
CreateBrush(RectangleF)
Creates the GDI+ Brush object.
Declaration
public override Brush CreateBrush(RectangleF rect)
Parameters
Type | Name | Description |
---|---|---|
RectangleF | rect | Drawing rectangle. |
Returns
Type | Description |
---|---|
Brush | Brush object. |
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
Serialize(FRWriter, String, FillBase)
Serializes the fill.
Declaration
public override void Serialize(FRWriter writer, string prefix, FillBase fill)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer | Writer object. |
System.String | prefix | Name of the fill property. |
FillBase | fill | Fill object to compare with. |
Overrides
Remarks
This method is for internal use only.