ColoredGlyph Class
Definition
Section titled “Definition”Represents an individual piece of a ICellSurface containing a glyph, foreground color, background color, and a mirror effect.
public class ColoredGlyph : ColoredGlyphBase, IMatchable<ColoredGlyphBase>, IMatchable<ColoredGlyph>Inheritance object → ColoredGlyphBase
Implements IMatchable<ColoredGlyphBase>, IMatchable<ColoredGlyph>
Constructors
Section titled “Constructors”ColoredGlyph()
Section titled “ColoredGlyph()”Creates a cell with a white foreground, black background, glyph 0, and no mirror effect.
public ColoredGlyph()ColoredGlyph(Color)
Section titled “ColoredGlyph(Color)”Creates a cell with the specified foreground, black background, glyph 0, and no mirror effect.
public ColoredGlyph(Color foreground)Parameters
Section titled “Parameters”foreground SadRogue.Primitives.Color
Foreground color.
ColoredGlyph(Color, Color)
Section titled “ColoredGlyph(Color, Color)”Creates a cell with the specified foreground, specified background, glyph 0, and no mirror effect.
public ColoredGlyph(Color foreground, Color background)Parameters
Section titled “Parameters”foreground SadRogue.Primitives.Color
Foreground color.
background SadRogue.Primitives.Color
Background color.
ColoredGlyph(Color, Color, int)
Section titled “ColoredGlyph(Color, Color, int)”Creates a cell with the specified foreground, background, and glyph, with no mirror effect.
public ColoredGlyph(Color foreground, Color background, int glyph)Parameters
Section titled “Parameters”foreground SadRogue.Primitives.Color
Foreground color.
background SadRogue.Primitives.Color
Background color.
glyph int
The glyph index.
ColoredGlyph(Color, Color, int, Mirror)
Section titled “ColoredGlyph(Color, Color, int, Mirror)”Creates a cell with the specified foreground, background, glyph, and mirror effect.
public ColoredGlyph(Color foreground, Color background, int glyph, Mirror mirror)Parameters
Section titled “Parameters”foreground SadRogue.Primitives.Color
Foreground color.
background SadRogue.Primitives.Color
Background color.
glyph int
The glyph index.
mirror Mirror
The mirror effect.
ColoredGlyph(Color, Color, int, Mirror, bool)
Section titled “ColoredGlyph(Color, Color, int, Mirror, bool)”Creates a cell with the specified foreground, background, glyph, mirror, and visibility.
public ColoredGlyph(Color foreground, Color background, int glyph, Mirror mirror, bool isVisible)Parameters
Section titled “Parameters”foreground SadRogue.Primitives.Color
Foreground color.
background SadRogue.Primitives.Color
Background color.
glyph int
The glyph index.
mirror Mirror
The mirror effect.
isVisible bool
The visibility of the glyph.
ColoredGlyph(Color, Color, int, Mirror, bool, List<CellDecorator>)
Section titled “ColoredGlyph(Color, Color, int, Mirror, bool, List<CellDecorator>)”Creates a cell with the specified foreground, background, glyph, mirror effect, visibility and decorators.
public ColoredGlyph(Color foreground, Color background, int glyph, Mirror mirror, bool isVisible, List<CellDecorator> decorators)Parameters
Section titled “Parameters”foreground SadRogue.Primitives.Color
Foreground color.
background SadRogue.Primitives.Color
Background color.
glyph int
The glyph index.
mirror Mirror
The mirror effect.
isVisible bool
The visibility of the glyph.
decorators List<CellDecorator>
Decorators for the cell.
Methods
Section titled “Methods”Clear()
Section titled “Clear()”Resets the foreground, background, glyph, mirror effect and decorators.
public override void Clear()Clone()
Section titled “Clone()”Returns a new cell with the same properties as this one.
public override ColoredGlyphBase Clone()Returns
Section titled “Returns”ColoredGlyphBase
The new cell.
Matches(ColoredGlyph?)
Section titled “Matches(ColoredGlyph?)”Checks if this ColoredGlyph object’s properties match another’s.
public bool Matches(ColoredGlyph? other)Parameters
Section titled “Parameters”other ColoredGlyph
The other object to check.
Returns
Section titled “Returns”bool
Returns true when the object’s properties match; otherwise false.