Skip to content

GlyphDefinition Struct

Represents a decorator (glyph and mirror) defined by a font.

C#
public readonly struct GlyphDefinition

Creates a new cell decorator instance.

C#
public GlyphDefinition(int glyph, Mirror mirror)

glyph int

mirror Mirror

Gets a glyph definition that has -1 for the glyph.

C#
public static GlyphDefinition Empty { get; }

The glyph of the decorator.

C#
public int Glyph { get; init; }

The mirror effect of the decorator.

C#
public Mirror Mirror { get; init; }

Creates a CellDecorator from this definition.

C#
public CellDecorator CreateCellDecorator(Color foreground)

foreground SadRogue.Primitives.Color
The color of the decorator.

CellDecorator
A new decorator instance.

Creates a ColoredGlyphBase from this definition.

C#
public ColoredGlyphBase CreateCell(Color foreground, Color background)

foreground SadRogue.Primitives.Color
The foreground color of the cell.

background SadRogue.Primitives.Color
The background color of the cell.

ColoredGlyphBase
A new cell instance.