Property | Type | Description | |
---|---|---|---|
UnitCount | int |
Property | Type | Description | |
---|---|---|---|
_buffer | ].BufferUnitInfo[ | ||
_width | int |
Method | Description | |
---|---|---|
Clear ( BufferColor color = BufferColor.Black ) : void |
Clears all units in the buffer, optionally specifying a color to fill the buffer with.
|
|
ClearBrush ( |
Fills the entire buffer with a brush.
|
|
Clone ( ) : |
Returns a new ConsoleBuffer instance containing a copy of the buffer's contents.
|
|
ConsoleBuffer ( int width, int height ) : System |
Initializes a new ConsoleBuffer instance with the specified dimensions.
|
|
CreateScreenBuffer ( ) : |
Creates a buffer whose size matches the current unit dimensions of the console.
|
|
DrawBox ( |
Draws a box from the specified rectangle and brush information.
|
|
DrawBox ( int x, int y, int w, int h, |
Draws a solid box with the specified dimensions to the buffer.
|
|
DrawBox ( int x, int y, int w, int h, BufferColor color ) : void |
Draws a solid box with the specified dimensions to the buffer.
|
|
DrawBox ( int x, int y, int w, int h, int thickness, |
Draws a box with the specified border and fill brushes.
|
|
DrawBuffer ( |
Draws the contents of another buffer onto this buffer at the specified location.
|
|
DrawCircle ( int x, int y, int radius, |
Draws a solid circle to the buffer with the specified attributes.
|
|
DrawCircle ( int x, int y, int radius, BufferColor color ) : void |
Draws a solid circle to the buffer with the specified attributes.
|
|
DrawCircle ( int x, int y, int radius, int thickness, |
Draws a circle with the specified radius, border thickness, and attributes for both border and fill.
|
|
DrawCircle ( int x, int y, int radius, int thickness, BufferColor border, BufferColor fill ) : void |
Draws a circle with the specified radius, border thickness, and attributes for both border and fill.
|
|
DrawLine ( Point a, Point b, |
Draws a line to the buffer with the specified brush.
|
|
DrawLine ( Point a, Point b, BufferColor color ) : void |
Draws a colored line to the buffer.
|
|
DrawLine ( int x, int y, int x2, int y2, |
Draws a line to the buffer.
|
|
DrawLine ( int x, int y, int x2, int y2, BufferColor color ) : void |
Draws a line to the buffer.
|
|
DrawString ( int x, int y, Alignment alignment ) : void |
Draws a string to the buffer with the specified alignment.
|
|
DrawString ( int x, int y, string text, BufferColor color, Alignment alignment = Alignment.Left ) : void |
Prints a string to the buffer with the specified attributes and alignment.
|
|
DrawTriangle ( Point a, Point b, Point c, |
Draws a triangle to the buffer.
|
|
DrawTriangle ( Point a, Point b, Point c, BufferColor color ) : void |
Draws a triangle to the buffer.
|
|
DrawTriangle ( |
Draws a triangle to the buffer.
|
|
DrawTriangle ( |
Draws a triangle with the specified border and fill brushes.
|
|
DrawTriangle ( |
Draws a triangle to the buffer.
|
|
FloodFill ( int x, int y, |
Flood fills a closed region containing the specified coordinates with a brush.
|
|
FloodFill ( int x, int y, BufferColor color ) : void |
Flood fills a closed region containing the specified coordinates with a color.
|
|
FromFile ( string path ) : |
Loads buffer data from a file and returns it as a ConsoleBuffer object.
|
|
GetColorFromUV ( double u, double v, TextureSampleMode mode = TextureSampleMode.Tile ) : BufferColor |
Returns the unit background color at the specified texture coordinates.
|
|
GetUnitAttributes ( int x, int y ) : BufferUnitAttributes |
Returns the attributes for the specified unit.
|
|
GetUnitBackColor ( Point point ) : BufferColor |
Gets the background color of the specified unit.
|
|
GetUnitBackColor ( int x, int y ) : BufferColor |
Gets the background color of the specified unit.
|
|
GetUnitCharacter ( Point point ) : char |
Gets the character in the specified unit.
|
|
GetUnitCharacter ( int x, int y ) : char |
Gets the character in the specified unit.
|
|
GetUnitForeColor ( Point point ) : BufferColor |
Gets the foreground color of the specified unit.
|
|
GetUnitForeColor ( int x, int y ) : BufferColor |
Gets the foreground color of the specified unit.
|
|
ResampledCopy ( |
Creates a resampled copy of a console buffer using the specified dimensions.
|
|
Save ( string path ) : void |
Writes the buffer data to a file.
|
|
SetUnitAttributes ( Point point, BufferUnitAttributes attributes ) : void |
Sets the attributes for a specific unit in the buffer.
|
|
SetUnitAttributes ( int x, int y, BufferUnitAttributes attributes ) : void |
Sets attributes for a specific unit in the buffer.
|
|
SetUnitBackColor ( Point point, BufferColor color ) : void |
Sets the background color for a specific unit in the buffer.
|
|
SetUnitBackColor ( int x, int y, BufferColor color ) : void |
Sets the background color for a specific unit in the buffer.
|
|
SetUnitCharacter ( Point p, char c ) : void |
Sets the character for a specific unit in the buffer.
|
|
SetUnitCharacter ( int x, int y, char c ) : void |
Sets the character for a specific unit in the buffer.
|
|
SetUnitForeColor ( Point point, BufferColor color ) : void |
Sets the foreground color for a specific unit in the buffer.
|
|
SetUnitForeColor ( int x, int y, BufferColor color ) : void |
Sets the foreground color for a specific unit in the buffer.
|
Method | Description | |
---|---|---|
InBounds ( Point point ) : bool | ||
InBounds ( int x, int y ) : bool |
Method | Description | |
---|---|---|
ConsoleBuffer ( int width, int height, |
public Clear ( BufferColor color = BufferColor.Black ) : void | ||
color | BufferColor | The color to fill the buffer with. |
return | void |
public ClearBrush ( |
||
brush | The brush to fill the buffer with. | |
return | void |
public ConsoleBuffer ( int width, int height ) : System | ||
width | int | The width of the buffer, in units. |
height | int | The height of the buffer, in units. |
return | System |
public static CreateScreenBuffer ( ) : |
||
return |
public DrawBox ( |
||
rectangle | The bounds of the box to draw. | |
thickness | int | The border thickness of the box. |
border | the border brush of the box. | |
fill | The fill brush of the box. | |
return | void |
public DrawBox ( int x, int y, int w, int h, |
||
x | int | The X coordinate of the box. |
y | int | The Y coordinate of the box. |
w | int | The width of the box. |
h | int | The height of the box. |
brush | The brush to draw the box with. | |
return | void |
public DrawBox ( int x, int y, int w, int h, BufferColor color ) : void | ||
x | int | The X coordinate of the box. |
y | int | The Y coordinate of the box. |
w | int | The width of the box. |
h | int | The height of the box. |
color | BufferColor | The color to draw the box with. |
return | void |
public DrawBox ( int x, int y, int w, int h, int thickness, |
||
x | int | The X position of the box. |
y | int | The Y position of the box. |
w | int | The width of the box. |
h | int | The height of the box. |
thickness | int | The border thickness of the box. |
border | The brush to draw the border with. | |
fill | The brush to draw the fill with. | |
return | void |
public DrawBuffer ( |
||
buffer | The buffer to draw. | |
x | int | The X position to begin drawing at. |
y | int | The Y position to begin drawing at. |
drawMode | BufferDrawMode | Specified how the buffer should be drawn. |
return | void |
public DrawCircle ( int x, int y, int radius, |
||
x | int | The X position of the circle, relative to its center. |
y | int | The Y position of the circle, relative to its center. |
radius | int | The radius of the circle. |
brush | The brush to draw the circle with. | |
return | void |
public DrawCircle ( int x, int y, int radius, BufferColor color ) : void | ||
x | int | The X position of the circle, relative to its center. |
y | int | The Y position of the circle, relative to its center. |
radius | int | The radius of the circle. |
color | BufferColor | The color to draw the circle with. |
return | void |
public DrawCircle ( int x, int y, int radius, int thickness, |
||
x | int | The X position of the circle, relative to its center. |
y | int | The Y position of the circle, relative to its center. |
radius | int | The radius of the circle. |
thickness | int | The border thickness of the circle. |
border | The border brush for the circle. | |
fill | The fill brush for the circle. | |
return | void |
public DrawCircle ( int x, int y, int radius, int thickness, BufferColor border, BufferColor fill ) : void | ||
x | int | The X position of the circle, relative to its center. |
y | int | The Y position of the circle, relative to its center. |
radius | int | The radius of the circle. |
thickness | int | The border thickness of the circle. |
border | BufferColor | The border color for the circle. |
fill | BufferColor | The fill color for the circle. |
return | void |
public DrawLine ( Point a, Point b, |
||
a | Point | The starting point of the line. |
b | Point | The ending point of the line. |
brush | The brush to draw the line with. | |
return | void |
public DrawLine ( Point a, Point b, BufferColor color ) : void | ||
a | Point | The starting point of the line. |
b | Point | The ending point of the line. |
color | BufferColor | The color of the line. |
return | void |
public DrawLine ( int x, int y, int x2, int y2, |
||
x | int | The starting X coordinate of the line. |
y | int | The starting Y coordinate of the line. |
x2 | int | The ending X coordinate of the line. |
y2 | int | The ending Y coordinate of the line. |
brush | The brush to draw the line with. | |
return | void |
public DrawLine ( int x, int y, int x2, int y2, BufferColor color ) : void | ||
x | int | The starting X coordinate of the line. |
y | int | The starting Y coordinate of the line. |
x2 | int | The ending X coordinate of the line. |
y2 | int | The ending Y coordinate of the line. |
color | BufferColor | The color of the line. |
return | void |
public DrawString ( int x, int y, Alignment alignment ) : void | ||
x | int | The X coordinate to start printing at. |
y | int | The Y coordinate to start printing at. |
alignment | Alignment | The alinment to assign to the string. |
return | void |
public DrawString ( int x, int y, string text, BufferColor color, Alignment alignment = Alignment.Left ) : void | ||
x | int | The X coordinate to start printing at. |
y | int | The Y coordinate to start printing at. |
text | string | The string to print. |
color | BufferColor | The color to assign to the text. |
alignment | Alignment | The alignment of the string. |
return | void |
public DrawTriangle ( Point a, Point b, Point c, |
||
a | Point | The first point of the triangle. |
b | Point | The second point of the triangle. |
c | Point | The third point of the triangle. |
brush | The brush of the line. | |
return | void |
public DrawTriangle ( Point a, Point b, Point c, BufferColor color ) : void | ||
a | Point | The first point of the triangle. |
b | Point | The second point of the triangle. |
c | Point | The third point of the triangle. |
color | BufferColor | The color of the line. |
return | void |
public DrawTriangle ( |
||
triangle | The triangle to draw. | |
brush | The brush to draw the triangle with. | |
return | void |
public DrawTriangle ( |
||
triangle | The triangle to draw. | |
border | The border brush. | |
fill | The fill brush. | |
return | void |
public DrawTriangle ( |
||
triangle | The triangle to draw. | |
color | BufferColor | The color to draw the triangle. |
return | void |
public FloodFill ( int x, int y, |
||
x | int | The X coordinate to begin filling at. |
y | int | The Y coordinate to begin filling at. |
brush | The brush to fill the region with. | |
return | void |
public FloodFill ( int x, int y, BufferColor color ) : void | ||
x | int | The X coordinate to begin filling at. |
y | int | The Y coordinate to begin filling at. |
color | BufferColor | The color to fill the region with. |
return | void |
public static FromFile ( string path ) : |
||
path | string | The path to the buffer file. |
return |
public GetColorFromUV ( double u, double v, TextureSampleMode mode = TextureSampleMode.Tile ) : BufferColor | ||
u | double | The U coordinate. |
v | double | The V coordinate. |
mode | TextureSampleMode | The sampling mode to use. |
return | BufferColor |
public GetUnitAttributes ( int x, int y ) : BufferUnitAttributes | ||
x | int | The X coordinate of the unit. |
y | int | The Y coordinate of the unit. |
return | BufferUnitAttributes |
public GetUnitBackColor ( Point point ) : BufferColor | ||
point | Point | The location of the unit. |
return | BufferColor |
public GetUnitBackColor ( int x, int y ) : BufferColor | ||
x | int | The X coordinate of the unit. |
y | int | The Y coordinate of the unit. |
return | BufferColor |
public GetUnitCharacter ( Point point ) : char | ||
point | Point | The location of the unit. |
return | char |
public GetUnitCharacter ( int x, int y ) : char | ||
x | int | The X coordinate of the unit. |
y | int | The Y coordinate of the unit. |
return | char |
public GetUnitForeColor ( Point point ) : BufferColor | ||
point | Point | The location of the unit. |
return | BufferColor |
public GetUnitForeColor ( int x, int y ) : BufferColor | ||
x | int | The X coordinate of the unit. |
y | int | The Y coordinate of the unit. |
return | BufferColor |
public static ResampledCopy ( |
||
buffer | The buffer to be resampled. | |
width | int | The width of the resampled buffer. |
height | int | The height of the resampled buffer. |
return |
public Save ( string path ) : void | ||
path | string | The path to the file. |
return | void |
public SetUnitAttributes ( Point point, BufferUnitAttributes attributes ) : void | ||
point | Point | The location of the unit. |
attributes | BufferUnitAttributes | The attributes to assign to the unit. |
return | void |
public SetUnitAttributes ( int x, int y, BufferUnitAttributes attributes ) : void | ||
x | int | The X coordinate of the unit. |
y | int | The Y coordinate of the unit. |
attributes | BufferUnitAttributes | The attributes to assign to the unit. |
return | void |
public SetUnitBackColor ( Point point, BufferColor color ) : void | ||
point | Point | The location of the unit. |
color | BufferColor | The background color to set the unit to. |
return | void |
public SetUnitBackColor ( int x, int y, BufferColor color ) : void | ||
x | int | The X coordinate of the unit. |
y | int | The Y coordinate of the unit. |
color | BufferColor | The background color to set the unit to. |
return | void |
public SetUnitCharacter ( Point p, char c ) : void | ||
p | Point | The location of the unit. |
c | char | The character to assign to the unit. |
return | void |
public SetUnitCharacter ( int x, int y, char c ) : void | ||
x | int | The X coordinate of the unit. |
y | int | The Y coordinate of the unit. |
c | char | The character to assign to the unit. |
return | void |
public SetUnitForeColor ( Point point, BufferColor color ) : void | ||
point | Point | The location of the unit. |
color | BufferColor | The foreground color to set the unit to. |
return | void |
public SetUnitForeColor ( int x, int y, BufferColor color ) : void | ||
x | int | The X coordinate of the unit. |
y | int | The Y coordinate of the unit. |
color | BufferColor | The foreground color to set the unit to. |
return | void |