Class representing a Fill (background) entry. The Fill entry is used to define background colors and fill patterns.
More...
|
| | Fill () |
| | Default constructor.
|
| | Fill (string foreground, string background) |
| | Constructor with foreground and background color as sRGB values (without alpha).
|
| | Fill (string value, FillType fillType) |
| | Constructor with color value as sRGB and fill type.
|
| override string | ToString () |
| | Override toString method.
|
| override AbstractStyle | Copy () |
| | Method to copy the current object to a new one without casting.
|
| override int | GetHashCode () |
| | Returns a hash code for this instance.
|
| override bool | Equals (object obj) |
| | Returns whether two instances are the same.
|
| Fill | CopyFill () |
| | Method to copy the current object to a new one with casting.
|
| void | SetColor (string value, FillType fillType) |
| | Sets the color depending on fill type, using a sRGB value (without alpha).
|
| void | SetColor (Color value, FillType fillType) |
| | Sets the color depending on fill type, using a color object of the type Color.
|
| void | SetColor (IColor value, FillType fillType) |
| | Sets the color depending on fill type, using a color object, deriving from IColor.
|
| AbstractStyle | Copy () |
| | Abstract method to copy a component (dereferencing).
|
| int | CompareTo (AbstractStyle other) |
| | Method to compare two objects for sorting purpose.
|
| bool | Equals (AbstractStyle other) |
| | Method to compare two objects for sorting purpose.
|
|
| Color | BackgroundColor [get, set] |
| | Gets or sets the background color of the fill. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF. If set, the value will be cast to upper case.
|
| Color | ForegroundColor [get, set] |
| | Gets or sets the foreground color of the fill. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF. If set, the value will be bast to upper case.
|
| PatternValue | PatternFill [get, set] |
| | Gets or sets the pattern type of the fill (Default is none).
|
| int? | InternalID [get, set] |
| | Gets or sets the internal ID for sorting purpose in the Excel style document (nullable).
|
Class representing a Fill (background) entry. The Fill entry is used to define background colors and fill patterns.
Definition at line 19 of file Fill.cs.
◆ FillType
Enum for the type of the color, used by the Fill class.
| Enumerator |
|---|
| PatternColor | Color defines a pattern color.
|
| FillColor | Color defines a solid fill color.
|
Definition at line 41 of file Fill.cs.
◆ PatternValue
Enum for the pattern values, used by the Fill class.
| Enumerator |
|---|
| None | No pattern (default).
|
| Solid | Solid fill (for colors).
|
| DarkGray | Dark gray fill.
|
| MediumGray | Medium gray fill.
|
| LightGray | Light gray fill.
|
| Gray0625 | 6.25% gray fill
|
| Gray125 | 12.5% gray fill
|
Definition at line 52 of file Fill.cs.
◆ Fill() [1/3]
| NanoXLSX.Styles.Fill.Fill |
( |
| ) |
|
Default constructor.
Definition at line 127 of file Fill.cs.
◆ Fill() [2/3]
| NanoXLSX.Styles.Fill.Fill |
( |
string | foreground, |
|
|
string | background ) |
Constructor with foreground and background color as sRGB values (without alpha).
- Parameters
-
| foreground | Foreground color of the fill |
| background | Background color of the fill |
Definition at line 138 of file Fill.cs.
◆ Fill() [3/3]
| NanoXLSX.Styles.Fill.Fill |
( |
string | value, |
|
|
FillType | fillType ) |
Constructor with color value as sRGB and fill type.
- Parameters
-
| value | Color value |
| fillType | Fill type (fill or pattern) |
Definition at line 150 of file Fill.cs.
◆ Copy()
Method to copy the current object to a new one without casting.
- Returns
- Copy of the current object without the internal ID
Definition at line 188 of file Fill.cs.
◆ CopyFill()
| Fill NanoXLSX.Styles.Fill.CopyFill |
( |
| ) |
|
Method to copy the current object to a new one with casting.
- Returns
- Copy of the current object without the internal ID
Definition at line 234 of file Fill.cs.
◆ Equals()
| override bool NanoXLSX.Styles.Fill.Equals |
( |
object | obj | ) |
|
Returns whether two instances are the same.
- Parameters
-
- Returns
- True if this instance and the other are the same
Definition at line 222 of file Fill.cs.
◆ GetHashCode()
| override int NanoXLSX.Styles.Fill.GetHashCode |
( |
| ) |
|
Returns a hash code for this instance.
- Returns
- A hash code for this instance, suitable to be used in hashing algorithms and data structures like a hash table.
Definition at line 205 of file Fill.cs.
◆ operator Fill() [1/3]
| implicit NanoXLSX.Styles.Fill.operator Fill |
( |
IndexedColor.Value | index | ) |
|
|
static |
Implicit operator to create a Fill object from an indexed color value (IndexedColor.Value) as foreground color with FillType.FillColor.
- Parameters
-
| index | Color index (0 to 65) |
Definition at line 304 of file Fill.cs.
◆ operator Fill() [2/3]
| implicit NanoXLSX.Styles.Fill.operator Fill |
( |
int | index | ) |
|
|
static |
Implicit operator to create a Fill object from an indexed color index (numeric) as foreground color with FillType.FillColor.
- Parameters
-
| index | Color index (0 to 65) |
Definition at line 316 of file Fill.cs.
◆ operator Fill() [3/3]
| implicit NanoXLSX.Styles.Fill.operator Fill |
( |
string | value | ) |
|
|
static |
Implicit operator to create a Fill object from a string (RGB or ARGB) as foreground color with FillType.FillColor.
- Parameters
-
Definition at line 295 of file Fill.cs.
◆ SetColor() [1/3]
| void NanoXLSX.Styles.Fill.SetColor |
( |
Color | value, |
|
|
FillType | fillType ) |
Sets the color depending on fill type, using a color object of the type Color.
- Parameters
-
| value | color value (compound object) |
| fillType | fill type (fill or pattern) |
Definition at line 264 of file Fill.cs.
◆ SetColor() [2/3]
| void NanoXLSX.Styles.Fill.SetColor |
( |
IColor | value, |
|
|
FillType | fillType ) |
Sets the color depending on fill type, using a color object, deriving from IColor.
- Parameters
-
| value | color value (component) |
| fillType | fill type (fill or pattern) |
Definition at line 284 of file Fill.cs.
◆ SetColor() [3/3]
| void NanoXLSX.Styles.Fill.SetColor |
( |
string | value, |
|
|
FillType | fillType ) |
Sets the color depending on fill type, using a sRGB value (without alpha).
- Parameters
-
| value | color value |
| fillType | fill type (fill or pattern) |
Definition at line 244 of file Fill.cs.
◆ ToString()
| override string NanoXLSX.Styles.Fill.ToString |
( |
| ) |
|
Override toString method.
- Returns
- String of a class
Definition at line 172 of file Fill.cs.
◆ DefaultColor
Default Color (foreground or background).
Definition at line 25 of file Fill.cs.
◆ DefaultIndexedColor
Default index color.
Definition at line 29 of file Fill.cs.
◆ DefaultPatternFill
Default pattern.
Definition at line 33 of file Fill.cs.
◆ BackgroundColor
| Color NanoXLSX.Styles.Fill.BackgroundColor |
|
getset |
Gets or sets the background color of the fill. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF. If set, the value will be cast to upper case.
Definition at line 86 of file Fill.cs.
◆ ForegroundColor
| Color NanoXLSX.Styles.Fill.ForegroundColor |
|
getset |
Gets or sets the foreground color of the fill. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF. If set, the value will be bast to upper case.
Definition at line 104 of file Fill.cs.
◆ PatternFill
Gets or sets the pattern type of the fill (Default is none).
Definition at line 120 of file Fill.cs.
The documentation for this class was generated from the following file: