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
x
intThe x position of the buffer, top left corner
y
intThe y position of the buffer, top left corner
b
BufferThe other buffer
ReplaceNull(CharFormat?)
Replaces the null colors for printing
public void ReplaceNull(CharFormat? def)
Parameters
def
CharFormatThe 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
x
intThe x position of the char
y
intThe y position of the char
c
char?The char
f
CharFormatThe char format
ToString(char, CharFormat?)
Generates the string representation
public string ToString(char defChar, CharFormat? def)
Parameters
defChar
charThe default char, usually space
def
CharFormatThe default format