Struct CellDecorator
Decorates a cell with a colored glyph.
Implements
Inherited Members
Namespace: SadConsole
Assembly: SadConsole.dll
Syntax
[DataContract]
public readonly struct CellDecorator : IEquatable<CellDecorator>
Constructors
CellDecorator(Color, int, Mirror)
Creates a new decorator with the specified colors, glyph, visiblity, and mirror settings.
Declaration
public CellDecorator(Color color, int glyph, Mirror mirror)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Foreground color. |
| int | glyph | Glyph value. |
| Mirror | mirror | Mirror setting. |
Properties
Color
Foreground color of the decorator.
Declaration
[DataMember]
public Color Color { get; init; }
Property Value
| Type | Description |
|---|---|
| Color |
Empty
An empty cell decorator.
Declaration
public static CellDecorator Empty { get; }
Property Value
| Type | Description |
|---|---|
| CellDecorator |
Glyph
Glyph of the decorator.
Declaration
[DataMember]
public int Glyph { get; init; }
Property Value
| Type | Description |
|---|---|
| int |
Mirror
Mirror setting of the decorator.
Declaration
[DataMember]
public Mirror Mirror { get; init; }
Property Value
| Type | Description |
|---|---|
| Mirror |
Methods
Equals(CellDecorator)
Determines if this object has the same value as the other.
Declaration
public bool Equals(CellDecorator other)
Parameters
| Type | Name | Description |
|---|---|---|
| CellDecorator | other | The object to test against. |
Returns
| Type | Description |
|---|---|
| bool | True if the objects have the same values. |
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
Operators
operator ==(CellDecorator, CellDecorator)
Checks that the left and right objects match.
Declaration
public static bool operator ==(CellDecorator left, CellDecorator right)
Parameters
| Type | Name | Description |
|---|---|---|
| CellDecorator | left | The first object to test. |
| CellDecorator | right | The second object to test. |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(CellDecorator, CellDecorator)
Checks that the left and right objects do not match.
Declaration
public static bool operator !=(CellDecorator left, CellDecorator right)
Parameters
| Type | Name | Description |
|---|---|---|
| CellDecorator | left | The first object to test. |
| CellDecorator | right | The second object to test. |
Returns
| Type | Description |
|---|---|
| bool |