Skip to content

ColoredGlyph Class

Represents an individual piece of a ICellSurface containing a glyph, foreground color, background color, and a mirror effect.

C#
public class ColoredGlyph : ColoredGlyphBase, IMatchable<ColoredGlyphBase>, IMatchable<ColoredGlyph>

Inheritance objectColoredGlyphBase

Implements IMatchable<ColoredGlyphBase>, IMatchable<ColoredGlyph>

Creates a cell with a white foreground, black background, glyph 0, and no mirror effect.

C#
public ColoredGlyph()

Creates a cell with the specified foreground, black background, glyph 0, and no mirror effect.

C#
public ColoredGlyph(Color foreground)

foreground SadRogue.Primitives.Color
Foreground color.

Creates a cell with the specified foreground, specified background, glyph 0, and no mirror effect.

C#
public ColoredGlyph(Color foreground, Color background)

foreground SadRogue.Primitives.Color
Foreground color.

background SadRogue.Primitives.Color
Background color.

Creates a cell with the specified foreground, background, and glyph, with no mirror effect.

C#
public ColoredGlyph(Color foreground, Color background, int glyph)

foreground SadRogue.Primitives.Color
Foreground color.

background SadRogue.Primitives.Color
Background color.

glyph int
The glyph index.

Creates a cell with the specified foreground, background, glyph, and mirror effect.

C#
public ColoredGlyph(Color foreground, Color background, int glyph, Mirror mirror)

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.

C#
public ColoredGlyph(Color foreground, Color background, int glyph, Mirror mirror, bool isVisible)

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.

C#
public ColoredGlyph(Color foreground, Color background, int glyph, Mirror mirror, bool isVisible, List<CellDecorator> decorators)

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.

Resets the foreground, background, glyph, mirror effect and decorators.

C#
public override void Clear()

Returns a new cell with the same properties as this one.

C#
public override ColoredGlyphBase Clone()

ColoredGlyphBase
The new cell.

Checks if this ColoredGlyph object’s properties match another’s.

C#
public bool Matches(ColoredGlyph? other)

other ColoredGlyph
The other object to check.

bool
Returns true when the object’s properties match; otherwise false.