Table of Contents

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

x int
y int

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

bool

formatBuffer

public CharFormat?[] formatBuffer

Field Value

CharFormat[]

Properties

Xsize

public int Xsize { get; }

Property Value

int

Ysize

public int Ysize { get; }

Property Value

int

Methods

AddBuffer(int, int, Buffer)

Adds a whole buffer

public void AddBuffer(int x, int y, Buffer b)

Parameters

x int

The x position of the buffer, top left corner

y int

The y position of the buffer, top left corner

b Buffer

The other buffer

ReplaceNull(CharFormat?)

Replaces the null colors for printing

public void ReplaceNull(CharFormat? def)

Parameters

def CharFormat

The default format

SetChar(int, int, char?)

Sets a char

public void SetChar(int x, int y, char? c)

Parameters

x int

The x position of the char

y int

The y position of the char

c char?

The char

SetChar(int, int, char?, CharFormat?)

Sets a char

public void SetChar(int x, int y, char? c, CharFormat? f)

Parameters

x int

The x position of the char

y int

The y position of the char

c char?

The char

f CharFormat

The char format

ToString(char, CharFormat?)

Generates the string representation

public string ToString(char defChar, CharFormat? def)

Parameters

defChar char

The default char, usually space

def CharFormat

The default format

Returns

string