ColoredGlyphBase Class
Definition
Section titled “Definition”Represents an individual piece of a ICellSurface containing a glyph, foreground color, background color, and a mirror effect.
public abstract class ColoredGlyphBase : IMatchable<ColoredGlyphBase>Inheritance object
Implements IMatchable<ColoredGlyphBase>
Constructors
Section titled “Constructors”ColoredGlyphBase()
Section titled “ColoredGlyphBase()”protected ColoredGlyphBase()Properties
Section titled “Properties”Decorators
Section titled “Decorators”Modifies the look of a cell with additional character.
public List<CellDecorator>? Decorators { get; set; }Foreground
Section titled “Foreground”The foreground color of this cell.
public Color Foreground { get; set; }Background
Section titled “Background”The background color of this cell.
public Color Background { get; set; }The glyph index from a font for this cell.
public int Glyph { get; set; }Mirror
Section titled “Mirror”The mirror effect for this cell.
public Mirror Mirror { get; set; }GlyphCharacter
Section titled “GlyphCharacter”The glyph.
[IgnoreDataMember]public char GlyphCharacter { get; set; }IsVisible
Section titled “IsVisible”true when this cell should be drawn; otherwise, false.
public bool IsVisible { get; set; }IsDirty
Section titled “IsDirty”true when this cell needs to be redrawn; otherwise, false.
public bool IsDirty { get; set; }Methods
Section titled “Methods”CopyAppearanceTo(ColoredGlyphBase, bool)
Section titled “CopyAppearanceTo(ColoredGlyphBase, bool)”Copies the visual appearance to the specified cell. This includes foreground, background, glyph, mirror effect and decorators.
public virtual void CopyAppearanceTo(ColoredGlyphBase cell, bool deepCopy = true)Parameters
Section titled “Parameters”cell ColoredGlyphBase
The target cell to copy to.
deepCopy bool
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.
CopyAppearanceFrom(ColoredGlyphBase, bool)
Section titled “CopyAppearanceFrom(ColoredGlyphBase, bool)”Sets the foreground, background, glyph, mirror effect and decorators to the same as the specified cell.
public virtual void CopyAppearanceFrom(ColoredGlyphBase cell, bool deepCopy = true)Parameters
Section titled “Parameters”cell ColoredGlyphBase
The target cell to copy from.
deepCopy bool
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.
Clear()
Section titled “Clear()”Resets the foreground, background, glyph, mirror effect and decorators.
public abstract void Clear()Clone()
Section titled “Clone()”Returns a new cell with the same properties as this one.
public abstract ColoredGlyphBase Clone()Returns
Section titled “Returns”ColoredGlyphBase
The new cell.
Matches(ColoredGlyphBase?)
Section titled “Matches(ColoredGlyphBase?)”Checks if this ColoredGlyph object’s properties match another’s.
public bool Matches(ColoredGlyphBase? other)Parameters
Section titled “Parameters”other ColoredGlyphBase
The other object to check.
Returns
Section titled “Returns”bool
Returns true when the object’s properties match; otherwise false.
CreateArray(int)
Section titled “CreateArray(int)”Creates an array of colored glyphs.
public static ColoredGlyphBase[] CreateArray(int size)Parameters
Section titled “Parameters”size int
Returns
Section titled “Returns”Events
Section titled “Events”IsDirtySet
Section titled “IsDirtySet”An event that is raised when the IsDirty property is set to true.
public event EventHandler? IsDirtySet