Class ParseCommandRecolor
Recolors a glyph.
Inherited Members
Namespace: SadConsole.StringParser
Assembly: SadConsole.dll
Syntax
public sealed class ParseCommandRecolor : ParseCommandBase
Constructors
ParseCommandRecolor()
Creates a new instance of this command.
Declaration
public ParseCommandRecolor()
ParseCommandRecolor(string)
Creates a new instance of this command.
Declaration
public ParseCommandRecolor(string parameters)
Parameters
Type | Name | Description |
---|---|---|
string | parameters | The string to parse for parameters. |
Fields
Default
Use the default foreground and background based on the CommandType.
Declaration
public bool Default
Field Value
Type | Description |
---|---|
bool |
KeepAlpha
Keeps the alpha channel of the existing color of the glyphs this command is applied to.
Declaration
public bool KeepAlpha
Field Value
Type | Description |
---|---|
bool |
KeepBlue
Keeps the blue channel of the existing color of the glyphs this command is applied to.
Declaration
public bool KeepBlue
Field Value
Type | Description |
---|---|
bool |
KeepGreen
Keeps the green channel of the existing color of the glyphs this command is applied to.
Declaration
public bool KeepGreen
Field Value
Type | Description |
---|---|
bool |
KeepRed
Keeps the red channel of the existing color of the glyphs this command is applied to.
Declaration
public bool KeepRed
Field Value
Type | Description |
---|---|
bool |
Properties
A
The current alpha value
Declaration
public byte A { get; set; }
Property Value
Type | Description |
---|---|
byte |
B
The current blue value
Declaration
public byte B { get; set; }
Property Value
Type | Description |
---|---|
byte |
G
The current green value
Declaration
public byte G { get; set; }
Property Value
Type | Description |
---|---|
byte |
R
The current red value
Declaration
public byte R { get; set; }
Property Value
Type | Description |
---|---|
byte |
Methods
Build(ref ColoredGlyphAndEffect, ColoredGlyphAndEffect[], int, ICellSurface?, ref int, ReadOnlySpan<char>, ParseCommandStacks)
Builds a glyph.
Declaration
public override void Build(ref ColoredGlyphAndEffect glyphState, ColoredGlyphAndEffect[] glyphString, int surfaceIndex, ICellSurface? surface, ref int stringIndex, ReadOnlySpan<char> processedString, ParseCommandStacks commandStack)
Parameters
Type | Name | Description |
---|---|---|
ColoredGlyphAndEffect | glyphState | The current glyph being built. |
ColoredGlyphAndEffect[] | glyphString | The current string of glyphs that has been processed until now. |
int | surfaceIndex | Where on the surface this glyph will appear. |
ICellSurface | surface | The surface associated with the glyph. |
int | stringIndex | Where in the original string this glyph is from. |
ReadOnlySpan<char> | processedString | The entire string being processed. |
ParseCommandStacks | commandStack | The state of commands. |