Struct GlyphDefinition
Represents a decorator (glyph and mirror) defined by a font.
Inherited Members
Namespace: SadConsole
Assembly: SadConsole.dll
Syntax
public readonly struct GlyphDefinition
Constructors
GlyphDefinition(int, Mirror)
Creates a new cell decorator instance.
Declaration
public GlyphDefinition(int glyph, Mirror mirror)
Parameters
| Type | Name | Description |
|---|---|---|
| int | glyph | |
| Mirror | mirror |
Properties
Empty
Gets a glyph definition that has -1 for the glyph.
Declaration
public static GlyphDefinition Empty { get; }
Property Value
| Type | Description |
|---|---|
| GlyphDefinition |
Glyph
The glyph of the decorator.
Declaration
public int Glyph { get; init; }
Property Value
| Type | Description |
|---|---|
| int |
Mirror
The mirror effect of the decorator.
Declaration
public Mirror Mirror { get; init; }
Property Value
| Type | Description |
|---|---|
| Mirror |
Methods
CreateCell(Color, Color)
Creates a ColoredGlyphBase from this definition.
Declaration
public ColoredGlyphBase CreateCell(Color foreground, Color background)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | foreground | The foreground color of the cell. |
| Color | background | The background color of the cell. |
Returns
| Type | Description |
|---|---|
| ColoredGlyphBase | A new cell instance. |
CreateCellDecorator(Color)
Creates a CellDecorator from this definition.
Declaration
public CellDecorator CreateCellDecorator(Color foreground)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | foreground | The color of the decorator. |
Returns
| Type | Description |
|---|---|
| CellDecorator | A new decorator instance. |