Class ColoredGlyphAndEffect
A ColoredGlyphBase with a ICellEffect.
Inherited Members
Namespace: SadConsole
Assembly: SadConsole.dll
Syntax
public sealed class ColoredGlyphAndEffect : ColoredGlyph, IMatchable<ColoredGlyphBase>, IMatchable<ColoredGlyph>, IMatchable<ColoredGlyphAndEffect>
Constructors
ColoredGlyphAndEffect()
Declaration
public ColoredGlyphAndEffect()
Properties
Effect
The effect of this cell.
Declaration
public ICellEffect? Effect { get; set; }
Property Value
Type | Description |
---|---|
ICellEffect |
Methods
Clear()
Resets the foreground, background, glyph, mirror effect and decorators.
Declaration
public override void Clear()
Overrides
Clone()
Returns a new cell with the same properties as this one.
Declaration
public override ColoredGlyphBase Clone()
Returns
Type | Description |
---|---|
ColoredGlyphBase | The new cell. |
Overrides
CopyAppearanceFrom(ColoredGlyphAndEffect, bool)
Sets the foreground, background, glyph, mirror effect and decorators to the same as the specified cell.
Declaration
public void CopyAppearanceFrom(ColoredGlyphAndEffect cell, bool deepCopy = true)
Parameters
Type | Name | Description |
---|---|---|
ColoredGlyphAndEffect | cell | The target cell to copy from. |
bool | deepCopy | Whether to perform a deep copy. Decorators are copied to a new array when true; when false, the old decorator array reference is moved directly. |
CopyAppearanceTo(ColoredGlyphAndEffect, bool)
Copies the visual appearance to the specified cell. This includes foreground, background, glyph, mirror effect and decorators.
Declaration
public void CopyAppearanceTo(ColoredGlyphAndEffect cell, bool deepCopy = true)
Parameters
Type | Name | Description |
---|---|---|
ColoredGlyphAndEffect | cell | The target cell to copy to. |
bool | deepCopy | Whether to perform a deep copy. Decorators are copied to a new array when true; when false, the old decorator array reference is moved directly. |
FromColoredGlyph(ColoredGlyphBase, ICellEffect?)
Creates a new ColoredGlyphAndEffect from a ColoredGlyphBase with the specified effect.
Declaration
public static ColoredGlyphAndEffect FromColoredGlyph(ColoredGlyphBase glyph, ICellEffect? effect = null)
Parameters
Type | Name | Description |
---|---|---|
ColoredGlyphBase | glyph | The glyph. |
ICellEffect | effect | When provided, sets the Effect. |
Returns
Type | Description |
---|---|
ColoredGlyphAndEffect |
Matches(ColoredGlyphAndEffect?)
Checks if this ColoredGlyphAndEffect object's properties match another's.
Declaration
public bool Matches(ColoredGlyphAndEffect? other)
Parameters
Type | Name | Description |
---|---|---|
ColoredGlyphAndEffect | other | The other object to check. |