Class Buffer
- Namespace
- AshConsoleGraphics
- Assembly
- AshConsoleGraphics.dll
Char and color buffer used for generating elements
public class Buffer
- Inheritance
-
Buffer
- Inherited Members
Constructors
Buffer(int, int)
Initializes a new empty buffer with its size
public Buffer(int x, int y)
Parameters
Fields
NoFormat
Global directive to stop generating buffers with format. Useful for terminals that dont support ansi escape sequences
public static bool NoFormat
Field Value
formatBuffer
public CharFormat?[] formatBuffer
Field Value
Properties
Xsize
public int Xsize { get; }
Property Value
Ysize
public int Ysize { get; }
Property Value
Methods
AddBuffer(int, int, Buffer)
Adds a whole buffer
public void AddBuffer(int x, int y, Buffer b)
Parameters
xintThe x position of the buffer, top left corner
yintThe y position of the buffer, top left corner
bBufferThe other buffer
ReplaceNull(CharFormat?)
Replaces the null colors for printing
public void ReplaceNull(CharFormat? def)
Parameters
defCharFormatThe default format
SetChar(int, int, char?)
Sets a char
public void SetChar(int x, int y, char? c)
Parameters
SetChar(int, int, char?, CharFormat?)
Sets a char
public void SetChar(int x, int y, char? c, CharFormat? f)
Parameters
xintThe x position of the char
yintThe y position of the char
cchar?The char
fCharFormatThe char format
ToString(char, CharFormat?)
Generates the string representation
public string ToString(char defChar, CharFormat? def)
Parameters
defCharcharThe default char, usually space
defCharFormatThe default format