CellSurfaceEditor Class
Definition
Section titled “Definition”Methods to interact with a ICellSurface.
public static class CellSurfaceEditorInheritance object
Methods
Section titled “Methods”SetPixels(ISurface, Color[])
Section titled “SetPixels(ISurface, Color[])”Sets each background of a cell to the array of colors. pixels must be the same length as the amount of cells in the surface.
public static void SetPixels(this ISurface obj, Color[] pixels)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
pixels SadRogue.Primitives.Color[]
The colors to place.
SetPixels(ISurface, Rectangle, Color[])
Section titled “SetPixels(ISurface, Rectangle, Color[])”Sets each background of a cell to the array of colors.
public static void SetPixels(this ISurface obj, Rectangle area, Color[] pixels)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
area SadRogue.Primitives.Rectangle
An area to fill with pixels.
pixels SadRogue.Primitives.Color[]
Colors for each cell of the obj.Surface.
IsValidCell(ISurface, int, int)
Section titled “IsValidCell(ISurface, int, int)”Tests if a cell is valid based on its x,y position.
public static bool IsValidCell(this ISurface obj, int x, int y)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x coordinate of the cell to test.
y int
The y coordinate of the cell to test.
Returns
Section titled “Returns”bool
A true value indicating the cell by x,y does exist in this cell obj.Surface.
IsValidCell(ISurface, Point)
Section titled “IsValidCell(ISurface, Point)”Tests if a cell is valid based on its x,y position.
public static bool IsValidCell(this ISurface obj, Point coordinate)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
coordinate SadRogue.Primitives.Point
The coordinate of the cell to test.
Returns
Section titled “Returns”bool
A true value indicating the cell by x,y does exist in this cell obj.Surface.
IsValidCell(ISurface, int, int, out int)
Section titled “IsValidCell(ISurface, int, int, out int)”Tests if a cell is valid based on its x,y position.
public static bool IsValidCell(this ISurface obj, int x, int y, out int index)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x coordinate of the cell to test.
y int
The y coordinate of the cell to test.
index int
If the cell is valid, the index of the cell when found.
Returns
Section titled “Returns”bool
A true value indicating the cell by x,y does exist in this cell obj.Surface.
IsValidCell(ISurface, Point, out int)
Section titled “IsValidCell(ISurface, Point, out int)”Tests if a cell is valid based on its x,y position.
public static bool IsValidCell(this ISurface obj, Point coordinate, out int index)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
coordinate SadRogue.Primitives.Point
The coordinate of the cell to test.
index int
If the cell is valid, the index of the cell when found.
Returns
Section titled “Returns”bool
A true value indicating the cell by x,y does exist in this cell obj.Surface.
IsValidCell(ISurface, int)
Section titled “IsValidCell(ISurface, int)”Tests if a cell is valid based on its index.
public static bool IsValidCell(this ISurface obj, int index)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
The index to test.
Returns
Section titled “Returns”bool
A true value indicating the cell index is in this cell obj.Surface.
SetGlyph(ISurface, int, int, GlyphDefinition)
Section titled “SetGlyph(ISurface, int, int, GlyphDefinition)”Changes the glyph and mirror of the specified cell.
public static void SetGlyph(this ISurface obj, int x, int y, GlyphDefinition definition)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
definition GlyphDefinition
The glyph and mirror of the cell.
SetGlyph(ISurface, int, int, int)
Section titled “SetGlyph(ISurface, int, int, int)”Changes the glyph of a specified cell to a new value.
public static void SetGlyph(this ISurface obj, int x, int y, int glyph)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
glyph int
The desired glyph of the cell.
SetGlyph(ISurface, int, int, int, Color)
Section titled “SetGlyph(ISurface, int, int, int, Color)”Changes the glyph and foreground of a cell.
public static void SetGlyph(this ISurface obj, int x, int y, int glyph, Color foreground)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
glyph int
The desired glyph.
foreground SadRogue.Primitives.Color
The desired foreground.
SetGlyph(ISurface, int, int, int, Color, Color)
Section titled “SetGlyph(ISurface, int, int, int, Color, Color)”Changes the glyph, foreground, and background of a cell.
public static void SetGlyph(this ISurface obj, int x, int y, int glyph, Color foreground, Color background)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
glyph int
The desired glyph.
foreground SadRogue.Primitives.Color
The desired foreground.
background SadRogue.Primitives.Color
The desired background.
SetGlyph(ISurface, int, int, int, Color, Color, Mirror)
Section titled “SetGlyph(ISurface, int, int, int, Color, Color, Mirror)”Changes the glyph, foreground, background, and mirror of a cell.
public static void SetGlyph(this ISurface obj, int x, int y, int glyph, Color foreground, Color background, Mirror mirror)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
glyph int
The desired glyph.
foreground SadRogue.Primitives.Color
The desired foreground.
background SadRogue.Primitives.Color
The desired background.
mirror Mirror
Sets how the glyph will be mirrored.
SetGlyph(ISurface, int, int, int, Color, Color, Mirror, IEnumerable<CellDecorator>)
Section titled “SetGlyph(ISurface, int, int, int, Color, Color, Mirror, IEnumerable<CellDecorator>)”Changes the glyph, foreground, background, and mirror of a cell.
public static void SetGlyph(this ISurface obj, int x, int y, int glyph, Color foreground, Color background, Mirror mirror, IEnumerable<CellDecorator> decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
glyph int
The desired glyph.
foreground SadRogue.Primitives.Color
The desired foreground.
background SadRogue.Primitives.Color
The desired background.
mirror Mirror
Sets how the glyph will be mirrored.
decorators IEnumerable<CellDecorator>
Decorators to set on the cell. Will clear existing decorators first.
GetGlyph(ISurface, int, int)
Section titled “GetGlyph(ISurface, int, int)”Gets the glyph of a specified cell.
public static int GetGlyph(this ISurface obj, int x, int y)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
Returns
Section titled “Returns”int
The glyph index.
SetForeground(ISurface, int, int, Color)
Section titled “SetForeground(ISurface, int, int, Color)”Changes the foreground of a specified cell to a new color.
public static void SetForeground(this ISurface obj, int x, int y, Color color)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
color SadRogue.Primitives.Color
The desired color of the cell.
GetForeground(ISurface, int, int)
Section titled “GetForeground(ISurface, int, int)”Gets the foreground of a specified cell.
public static Color GetForeground(this ISurface obj, int x, int y)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
Returns
Section titled “Returns”SadRogue.Primitives.Color
The color.
SetBackground(ISurface, int, int, Color)
Section titled “SetBackground(ISurface, int, int, Color)”Changes the background of a cell to the specified color.
public static void SetBackground(this ISurface obj, int x, int y, Color color)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
color SadRogue.Primitives.Color
The desired color of the cell.
GetBackground(ISurface, int, int)
Section titled “GetBackground(ISurface, int, int)”Gets the background of a specified cell.
public static Color GetBackground(this ISurface obj, int x, int y)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
Returns
Section titled “Returns”SadRogue.Primitives.Color
The color.
SetEffect(ISurface, int, int, ICellEffect?)
Section titled “SetEffect(ISurface, int, int, ICellEffect?)”Changes the effect of a cell to the specified effect.
public static void SetEffect(this ISurface obj, int x, int y, ICellEffect? effect)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
effect ICellEffect
The desired effect.
SetEffect(ISurface, int, ICellEffect?)
Section titled “SetEffect(ISurface, int, ICellEffect?)”Changes the effect of a cell to the specified effect.
public static void SetEffect(this ISurface obj, int index, ICellEffect? effect)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
Index of the cell.
effect ICellEffect
The desired effect.
SetEffect(ISurface, IEnumerable<Point>, ICellEffect?)
Section titled “SetEffect(ISurface, IEnumerable<Point>, ICellEffect?)”Changes the effect of a list of cells to the specified effect.
public static void SetEffect(this ISurface obj, IEnumerable<Point> cells, ICellEffect? effect)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
cells IEnumerable<Point>
The cells for the effect.
effect ICellEffect
The desired effect.
SetEffect(ISurface, IEnumerable<int>, ICellEffect?)
Section titled “SetEffect(ISurface, IEnumerable<int>, ICellEffect?)”Changes the effect of a list of cells to the specified effect.
public static void SetEffect(this ISurface obj, IEnumerable<int> cells, ICellEffect? effect)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
cells IEnumerable<int>
The cells for the effect.
effect ICellEffect
The desired effect.
SetEffect(ISurface, ColoredGlyphBase, ICellEffect?)
Section titled “SetEffect(ISurface, ColoredGlyphBase, ICellEffect?)”Changes the effect of a cell to the specified effect.
public static void SetEffect(this ISurface obj, ColoredGlyphBase cell, ICellEffect? effect)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
cell ColoredGlyphBase
The cells for the effect.
effect ICellEffect
The desired effect.
SetEffect(ISurface, IEnumerable<ColoredGlyphBase>, ICellEffect?)
Section titled “SetEffect(ISurface, IEnumerable<ColoredGlyphBase>, ICellEffect?)”Changes the effect of a cell to the specified effect.
public static void SetEffect(this ISurface obj, IEnumerable<ColoredGlyphBase> cells, ICellEffect? effect)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
cells IEnumerable<ColoredGlyphBase>
The cells for the effect.
effect ICellEffect
The desired effect.
GetEffect(ISurface, int, int)
Section titled “GetEffect(ISurface, int, int)”Gets the effect of the specified cell.
public static ICellEffect? GetEffect(this ISurface obj, int x, int y)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
Returns
Section titled “Returns”ICellEffect
The effect.
GetEffect(ISurface, int)
Section titled “GetEffect(ISurface, int)”Gets the effect of the specified cell.
public static ICellEffect? GetEffect(this ISurface obj, int index)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
The index of the cell.
Returns
Section titled “Returns”ICellEffect
The effect.
SetCellAppearance(ISurface, int, int, ColoredGlyphBase)
Section titled “SetCellAppearance(ISurface, int, int, ColoredGlyphBase)”Changes the appearance of the cell to that of the provided colored glyph object.
public static void SetCellAppearance(this ISurface obj, int x, int y, ColoredGlyphBase appearance)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
appearance ColoredGlyphBase
The desired appearance of the cell. A null value cannot be passed.
SetCellAppearance(ISurface, int, int, GlyphDefinition)
Section titled “SetCellAppearance(ISurface, int, int, GlyphDefinition)”Changes the appearance of the cell to that of the provided colored glyph object.
public static void SetCellAppearance(this ISurface obj, int x, int y, GlyphDefinition definition)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
definition GlyphDefinition
The glyph and mirror of the cell.
GetCellAppearance(ISurface, int, int)
Section titled “GetCellAppearance(ISurface, int, int)”Gets the appearance of a cell.
public static ColoredGlyphBase GetCellAppearance(this ISurface obj, int x, int y)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
Returns
Section titled “Returns”ColoredGlyphBase
The appearance.
GetCells(ISurface, Rectangle)
Section titled “GetCells(ISurface, Rectangle)”Gets an enumerable of cells over a specific area.
public static IEnumerable<ColoredGlyphBase> GetCells(this ISurface obj, Rectangle area)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
area SadRogue.Primitives.Rectangle
The area to get cells from.
Returns
Section titled “Returns”IEnumerable<ColoredGlyphBase>
A new array with references to each cell in the area.
GetSubSurface(ISurface, Rectangle)
Section titled “GetSubSurface(ISurface, Rectangle)”Returns a new surface with reference to each cell inside of the view.
public static ICellSurface GetSubSurface(this ISurface obj, Rectangle view)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
view SadRogue.Primitives.Rectangle
An area of the surface to create a view of.
Returns
Section titled “Returns”ICellSurface
A new surface
GetSubSurface(ISurface)
Section titled “GetSubSurface(ISurface)”Returns a new surface using the cells from the current surface.
public static ICellSurface GetSubSurface(this ISurface obj)Parameters
Section titled “Parameters”obj ISurface
The surface.
Returns
Section titled “Returns”ICellSurface
A new surface instance.
GetMirror(ISurface, int, int)
Section titled “GetMirror(ISurface, int, int)”Gets the mirror of a specified cell.
public static Mirror GetMirror(this ISurface obj, int x, int y)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
Returns
Section titled “Returns”Mirror
The Mirror of the cell.
SetMirror(ISurface, int, int, Mirror)
Section titled “SetMirror(ISurface, int, int, Mirror)”Sets the mirror of a specified cell.
public static void SetMirror(this ISurface obj, int x, int y, Mirror mirror)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
mirror Mirror
The mirror of the cell.
SetDecorator(ISurface, int, int, int, params CellDecorator[]?)
Section titled “SetDecorator(ISurface, int, int, int, params CellDecorator[]?)”Sets the decorator of one or more cells.
public static void SetDecorator(this ISurface obj, int x, int y, int count, params CellDecorator[]? decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x coordinate of the cell.
y int
The y coordinate of the cell.
count int
The count of cells to use from the x,y coordinate (inclusive).
decorators CellDecorator[]
The decorators. Use
null to clear.
SetDecorator(ISurface, Point, params CellDecorator[]?)
Section titled “SetDecorator(ISurface, Point, params CellDecorator[]?)”Sets the decorators of a cell.
public static void SetDecorator(this ISurface obj, Point position, params CellDecorator[]? decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
position SadRogue.Primitives.Point
The coordinate of the cell.
decorators CellDecorator[]
The decorators. Use
null to clear.
SetDecorator(ISurface, int, int, params CellDecorator[]?)
Section titled “SetDecorator(ISurface, int, int, params CellDecorator[]?)”Sets the decorator of one or more cells.
public static void SetDecorator(this ISurface obj, int index, int count, params CellDecorator[]? decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
The index of the cell to start applying.
count int
The count of cells to use from the index (inclusive).
decorators CellDecorator[]
The decorators. Use
null to clear.
SetDecorator(ISurface, int, params CellDecorator[]?)
Section titled “SetDecorator(ISurface, int, params CellDecorator[]?)”Sets the decorators of a single cell.
public static void SetDecorator(this ISurface obj, int index, params CellDecorator[]? decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
The index of the cell to start applying.
decorators CellDecorator[]
The decorators. Use
null to clear.
AddDecorator(ISurface, int, int, int, params CellDecorator[])
Section titled “AddDecorator(ISurface, int, int, int, params CellDecorator[])”Appends the decorators to one or more cells
public static void AddDecorator(this ISurface obj, int x, int y, int count, params CellDecorator[] decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x coordinate of the cell.
y int
The y coordinate of the cell.
count int
The count of cells to use from the x,y coordinate (inclusive).
decorators CellDecorator[]
The decorators.
AddDecorator(ISurface, Point, params CellDecorator[])
Section titled “AddDecorator(ISurface, Point, params CellDecorator[])”Appends the decorators to one or more cells
public static void AddDecorator(this ISurface obj, Point position, params CellDecorator[] decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
position SadRogue.Primitives.Point
The x,y coordinate of the cell.
decorators CellDecorator[]
The decorators.
AddDecorator(ISurface, int, int, params CellDecorator[])
Section titled “AddDecorator(ISurface, int, int, params CellDecorator[])”Appends the decorators to one or more cells
public static void AddDecorator(this ISurface obj, int index, int count, params CellDecorator[] decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
The index of the cell to start applying.
count int
The count of cells to use from the index (inclusive).
decorators CellDecorator[]
The decorators.
AddDecorator(ISurface, int, params CellDecorator[]?)
Section titled “AddDecorator(ISurface, int, params CellDecorator[]?)”Appends the decorators to one or more cells
public static void AddDecorator(this ISurface obj, int index, params CellDecorator[]? decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
The index of the cell to start applying.
decorators CellDecorator[]
The decorators.
RemoveDecorator(ISurface, int, int, int, params CellDecorator[])
Section titled “RemoveDecorator(ISurface, int, int, int, params CellDecorator[])”Removes the decorators from one or more cells.
public static void RemoveDecorator(this ISurface obj, int x, int y, int count, params CellDecorator[] decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x coordinate of the cell.
y int
The y coordinate of the cell.
count int
The count of cells to use from the x,y coordinate (inclusive).
decorators CellDecorator[]
The decorators.
RemoveDecorator(ISurface, Point, params CellDecorator[])
Section titled “RemoveDecorator(ISurface, Point, params CellDecorator[])”Removes the decorators from a cell.
public static void RemoveDecorator(this ISurface obj, Point position, params CellDecorator[] decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
position SadRogue.Primitives.Point
The x,y coordinate of the cell.
decorators CellDecorator[]
The decorators.
RemoveDecorator(ISurface, int, int, params CellDecorator[])
Section titled “RemoveDecorator(ISurface, int, int, params CellDecorator[])”Removes the decorators from one or more cells.
public static void RemoveDecorator(this ISurface obj, int index, int count, params CellDecorator[] decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
The index of the cell to start applying.
count int
The count of cells to use from the index (inclusive).
decorators CellDecorator[]
The decorators.
RemoveDecorator(ISurface, int, params CellDecorator[])
Section titled “RemoveDecorator(ISurface, int, params CellDecorator[])”Removes the decorators from a cell.
public static void RemoveDecorator(this ISurface obj, int index, params CellDecorator[] decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
The index of the cell to start applying.
decorators CellDecorator[]
The decorators.
ClearDecorators(ISurface, int, int, int)
Section titled “ClearDecorators(ISurface, int, int, int)”Clears the decorators of the specified cells.
public static void ClearDecorators(this ISurface obj, int x, int y, int count)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x coordinate of the cell.
y int
The y coordinate of the cell.
count int
The count of cells to use from the x,y coordinate (inclusive).
ClearDecorators(ISurface, int, int)
Section titled “ClearDecorators(ISurface, int, int)”Clears the decorators of the specified cells
public static void ClearDecorators(this ISurface obj, int index, int count)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
The index of the cell to start applying.
count int
The count of cells to use from the index (inclusive).
Print(ISurface, int, int, string)
Section titled “Print(ISurface, int, int, string)”Draws the string on the console at the specified location, wrapping if needed.
public static void Print(this ISurface obj, int x, int y, string text)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
X location of the text.
y int
Y location of the text.
text string
The string to display.
Print(ISurface, int, int, string, Color)
Section titled “Print(ISurface, int, int, string, Color)”Draws the string on the console at the specified location and color, wrapping if needed.
public static void Print(this ISurface obj, int x, int y, string text, Color foreground)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
X location of the text.
y int
Y location of the text.
text string
The string to display.
foreground SadRogue.Primitives.Color
Sets the foreground of all characters in the text.
Print(ISurface, int, int, string, Color, Color)
Section titled “Print(ISurface, int, int, string, Color, Color)”Draws the string on the console at the specified location with the specified foreground and background color, wrapping if needed.
public static void Print(this ISurface obj, int x, int y, string text, Color foreground, Color background)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
X location of the text.
y int
Y location of the text.
text string
The string to display.
foreground SadRogue.Primitives.Color
Sets the foreground of all characters in the text.
background SadRogue.Primitives.Color
Sets the background of all characters in the text.
Print(ISurface, int, int, string, Color, Color, Mirror)
Section titled “Print(ISurface, int, int, string, Color, Color, Mirror)”Draws the string on the console at the specified location with the specified settings.
public static void Print(this ISurface obj, int x, int y, string text, Color foreground, Color background, Mirror mirror)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
X location of the text.
y int
Y location of the text.
text string
The string to display.
foreground SadRogue.Primitives.Color
Sets the foreground of all characters in the text.
background SadRogue.Primitives.Color
Sets the background of all characters in the text.
mirror Mirror
The mirror to set on all characters in the text.
Print(ISurface, int, int, string, Color, Color, Mirror, CellDecorator[])
Section titled “Print(ISurface, int, int, string, Color, Color, Mirror, CellDecorator[])”Draws the string on the console at the specified location with the specified settings.
public static void Print(this ISurface obj, int x, int y, string text, Color foreground, Color background, Mirror mirror, CellDecorator[] decorators)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
X location of the text.
y int
Y location of the text.
text string
The string to display.
foreground SadRogue.Primitives.Color
Sets the foreground of all characters in the text.
background SadRogue.Primitives.Color
Sets the background of all characters in the text.
mirror Mirror
The mirror to set on all characters in the text.
decorators CellDecorator[]
An array of cell decorators to use on each glyph. A null value will clear the decorators.
Print(ISurface, int, int, string, Mirror)
Section titled “Print(ISurface, int, int, string, Mirror)”Draws the string on the console at the specified location with the specified settings.
public static void Print(this ISurface obj, int x, int y, string text, Mirror mirror)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
X location of the text.
y int
Y location of the text.
text string
The string to display.
mirror Mirror
The mirror to set on all characters in the text.
Print(ISurface, int, int, string, ColoredGlyphBase, ICellEffect?)
Section titled “Print(ISurface, int, int, string, ColoredGlyphBase, ICellEffect?)”Draws the string on the console at the specified location, wrapping if needed.
public static void Print(this ISurface obj, int x, int y, string text, ColoredGlyphBase appearance, ICellEffect? effect = null)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
X location of the text.
y int
Y location of the text.
text string
The string to display.
appearance ColoredGlyphBase
The appearance of the cell
effect ICellEffect
An optional effect to apply to the printed obj.Surface.
Print(ISurface, int, int, ColoredString)
Section titled “Print(ISurface, int, int, ColoredString)”Draws the string on the console at the specified location, wrapping if needed.
public static void Print(this ISurface obj, int x, int y, ColoredString text)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
X location of the text.
y int
Y location of the text.
text ColoredString
The string to display.
Print(ISurface, int, int, ColoredGlyphBase[])
Section titled “Print(ISurface, int, int, ColoredGlyphBase[])”Draws the string on the console at the specified location, wrapping if needed.
public static void Print(this ISurface obj, int x, int y, ColoredGlyphBase[] glyphs)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
X location of the text.
y int
Y location of the text.
glyphs ColoredGlyphBase[]
An array of glyphs to print at the specified position.
Print(ISurface, int, int, IEnumerable<ColoredGlyphBase>)
Section titled “Print(ISurface, int, int, IEnumerable<ColoredGlyphBase>)”Draws the string on the console at the specified location, wrapping if needed.
public static void Print(this ISurface obj, int x, int y, IEnumerable<ColoredGlyphBase> glyphs)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
X location of the text.
y int
Y location of the text.
glyphs IEnumerable<ColoredGlyphBase>
An enumeration of glyphs to print at the specified position.
GetString(ISurface, int, int, int)
Section titled “GetString(ISurface, int, int, int)”Builds a string from the text surface from the specified coordinates.
public static string GetString(this ISurface obj, int x, int y, int length)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x position of the surface to start at.
y int
The y position of the surface to start at.
length int
How many characters to fill the string with.
Returns
Section titled “Returns”string
A string built from the text surface data.
GetString(ISurface, int, int)
Section titled “GetString(ISurface, int, int)”Builds a string from the cells.
public static string GetString(this ISurface obj, int index, int length)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
Where to start getting characters from.
length int
How many characters to fill the string with.
Returns
Section titled “Returns”string
A string built from the text surface data.
GetStringColored(ISurface, int, int, int)
Section titled “GetStringColored(ISurface, int, int, int)”Builds a string from the text surface from the specified coordinates.
public static ColoredString GetStringColored(this ISurface obj, int x, int y, int length)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x position of the surface to start at.
y int
The y position of the surface to start at.
length int
How many characters to fill the string with.
Returns
Section titled “Returns”ColoredString
A string built from the text surface data.
GetStringColored(ISurface, int, int)
Section titled “GetStringColored(ISurface, int, int)”Builds a string from the text surface.
public static ColoredString GetStringColored(this ISurface obj, int index, int length)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
index int
Where to start getting characters from.
length int
How many characters to fill the string with.
Returns
Section titled “Returns”ColoredString
A string built from the text surface data.
ClearShiftValues(ISurface)
Section titled “ClearShiftValues(ISurface)”Resets the shifted amounts to 0, as if the surface has never shifted.
public static void ClearShiftValues(this ISurface obj)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
ShiftRow(ISurface, int, int, bool)
Section titled “ShiftRow(ISurface, int, int, bool)”Shifts the entire row by the specified amount.
public static void ShiftRow(this ISurface obj, int row, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
row int
The row to shift.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
ShiftRow(ISurface, int, int, int, int, bool)
Section titled “ShiftRow(ISurface, int, int, int, int, bool)”Shifts the specified row from an X position, by the specified amount.
public static void ShiftRow(this ISurface obj, int row, int startingX, int count, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
row int
The row to shift.
startingX int
The starting column to shift from.
count int
The number of cells to shift starting from startingX.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
Exceptions
Section titled “Exceptions”ArgumentOutOfRangeException
One of the parameters is outside of the surface width.
ShiftRowRight(ISurface, int, int, int, int, bool)
Section titled “ShiftRowRight(ISurface, int, int, int, int, bool)”Shifts the specified row from an X position, by the specified amount, to the right.
public static void ShiftRowRight(this ISurface obj, int row, int startingX, int count, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
row int
The row to shift.
startingX int
The starting column to shift from.
count int
The number of cells to shift starting from startingX.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
Exceptions
Section titled “Exceptions”ArgumentOutOfRangeException
One of the parameters is outside of the surface width.
ShiftRowLeft(ISurface, int, int, int, int, bool)
Section titled “ShiftRowLeft(ISurface, int, int, int, int, bool)”Shifts the specified row from an X position, by the specified amount, to the left.
public static void ShiftRowLeft(this ISurface obj, int row, int startingX, int count, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
row int
The row to shift.
startingX int
The starting column to shift from.
count int
The number of cells to shift starting from startingX.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
Exceptions
Section titled “Exceptions”ArgumentOutOfRangeException
One of the parameters is outside of the surface width.
ShiftRowRightUnchecked(ISurface, int, int, int, int, bool)
Section titled “ShiftRowRightUnchecked(ISurface, int, int, int, int, bool)”Internal use. Doesn’t do any checks on valid values. Shifts the specified row from an X position, by the specified amount, to the right.
public static void ShiftRowRightUnchecked(this ISurface obj, int row, int startingX, int count, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
row int
The row to shift.
startingX int
The starting column to shift from.
count int
The number of cells to shift starting from startingX.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
ShiftRowLeftUnchecked(ISurface, int, int, int, int, bool)
Section titled “ShiftRowLeftUnchecked(ISurface, int, int, int, int, bool)”Internal use. Doesn’t do any checks on valid values. Shifts the specified row from an X position, by the specified amount, to the left.
public static void ShiftRowLeftUnchecked(this ISurface obj, int row, int startingX, int count, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
row int
The row to shift.
startingX int
The starting column to shift from.
count int
The number of cells to shift starting from startingX.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
ShiftColumn(ISurface, int, int, bool)
Section titled “ShiftColumn(ISurface, int, int, bool)”Shifts the entire column by the specified amount.
public static void ShiftColumn(this ISurface obj, int col, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
col int
The column to shift.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
ShiftColumn(ISurface, int, int, int, int, bool)
Section titled “ShiftColumn(ISurface, int, int, int, int, bool)”Shifts the specified row from an X position, by the specified amount.
public static void ShiftColumn(this ISurface obj, int col, int startingY, int count, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
col int
The column to shift.
startingY int
The starting row to shift from.
count int
The number of cells to shift starting from startingY.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
Exceptions
Section titled “Exceptions”ArgumentOutOfRangeException
One of the parameters is outside of the surface height.
ShiftColumnDown(ISurface, int, int, int, int, bool)
Section titled “ShiftColumnDown(ISurface, int, int, int, int, bool)”Shifts the specified row from n Y position, by the specified amount, down.
public static void ShiftColumnDown(this ISurface obj, int col, int startingY, int count, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
col int
The column to shift.
startingY int
The starting row to shift from.
count int
The number of cells to shift starting from startingY.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
Exceptions
Section titled “Exceptions”ArgumentOutOfRangeException
One of the parameters is outside of the surface height.
ShiftColumnUp(ISurface, int, int, int, int, bool)
Section titled “ShiftColumnUp(ISurface, int, int, int, int, bool)”Shifts the specified row from n Y position, by the specified amount, up.
public static void ShiftColumnUp(this ISurface obj, int col, int startingY, int count, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
col int
The column to shift.
startingY int
The starting row to shift from.
count int
The number of cells to shift starting from startingY.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
Exceptions
Section titled “Exceptions”ArgumentOutOfRangeException
One of the parameters is outside of the surface height.
ShiftColumnDownUnchecked(ISurface, int, int, int, int, bool)
Section titled “ShiftColumnDownUnchecked(ISurface, int, int, int, int, bool)”Internal use. Doesn’t do any checks on valid values. Shifts the specified row from a Y position, by the specified amount, down.
public static void ShiftColumnDownUnchecked(this ISurface obj, int col, int startingY, int count, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
col int
The column to shift.
startingY int
The starting column to shift from.
count int
The number of cells to shift starting from startingY.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
ShiftColumnUpUnchecked(ISurface, int, int, int, int, bool)
Section titled “ShiftColumnUpUnchecked(ISurface, int, int, int, int, bool)”Internal use. Doesn’t do any checks on valid values. Shifts the specified row from a Y position, by the specified amount, up.
public static void ShiftColumnUpUnchecked(this ISurface obj, int col, int startingY, int count, int amount, bool wrap)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
col int
The column to shift.
startingY int
The starting column to shift from.
count int
The number of cells to shift starting from startingY.
amount int
The amount to shift by. A negative value shifts left and a positive value shifts right.
wrap bool
When true, wraps the glyph data from one side to another, otherwise clears the glyphs left behind.
ShiftUp(ISurface)
Section titled “ShiftUp(ISurface)”Scrolls all the console data up by one.
public static void ShiftUp(this ISurface obj)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
ShiftUp(ISurface, int, bool)
Section titled “ShiftUp(ISurface, int, bool)”Scrolls all the console data up by the specified amount of rows.
public static void ShiftUp(this ISurface obj, int amount, bool wrap = false)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
amount int
How many rows to shift.
wrap bool
When false, a blank line appears at the bottom. When true, the top line appears at the bottom.
ShiftDown(ISurface)
Section titled “ShiftDown(ISurface)”Scrolls all the console data down by one.
public static void ShiftDown(this ISurface obj)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
ShiftDown(ISurface, int, bool)
Section titled “ShiftDown(ISurface, int, bool)”Scrolls all the console data down by the specified amount of rows.
public static void ShiftDown(this ISurface obj, int amount, bool wrap = false)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
amount int
How many rows to shift.
wrap bool
When false, a blank line appears at the top. When true, the bottom line appears at the top.
ShiftRight(ISurface)
Section titled “ShiftRight(ISurface)”Scrolls all the console data right by one.
public static void ShiftRight(this ISurface obj)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
ShiftRight(ISurface, int, bool)
Section titled “ShiftRight(ISurface, int, bool)”Scrolls all the console data right by the specified amount.
public static void ShiftRight(this ISurface obj, int amount, bool wrap = false)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
amount int
How much to scroll.
wrap bool
When false, a blank line appears at the left. When true, the right line appears at the left.
ShiftLeft(ISurface)
Section titled “ShiftLeft(ISurface)”Scrolls all the console data left by one.
public static void ShiftLeft(this ISurface obj)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
ShiftLeft(ISurface, int, bool)
Section titled “ShiftLeft(ISurface, int, bool)”Scrolls all the console data left by the specified amount.
public static void ShiftLeft(this ISurface obj, int amount, bool wrap = false)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
amount int
How much to scroll.
wrap bool
When false, a blank line appears at the right. When true, the left line appears at the right.
Erase(ISurface, int, int, int)
Section titled “Erase(ISurface, int, int, int)”Starting at the specified coordinate, clears the glyph, mirror, and decorators, for the specified count of obj.Surface. Doesn’t clear the effect, foreground, or background.
public static ColoredGlyphBase[] Erase(this ISurface obj, int x, int y, int count)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x position.
y int
The y position.
count int
The count of glyphs to erase.
Returns
Section titled “Returns”ColoredGlyphBase[]
The cells processed by this method.
Remarks
Section titled “Remarks”Cells altered by this method has the Glyph set to DefaultGlyph, the Decorators array reset, and the Mirror set to None.
Erase(ISurface, int, int)
Section titled “Erase(ISurface, int, int)”Clears the glyph, mirror, and decorators, for the specified cell. Doesn’t clear the effect.
public static void Erase(this ISurface obj, int x, int y)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x position.
y int
The y position.
Remarks
Section titled “Remarks”The cell altered by this method has the Glyph set to DefaultGlyph, the Decorators array reset, and the Mirror set to None.
Erase(ISurface)
Section titled “Erase(ISurface)”Erases all cells which clears the glyph, mirror, and decorators. Doesn’t clear the effect.
public static void Erase(this ISurface obj)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
Remarks
Section titled “Remarks”All cells have Glyph set to DefaultGlyph, the Decorators array reset, and the Mirror set to None.
Clear(ISurface)
Section titled “Clear(ISurface)”Clears the console data. Characters are reset to 0, the foreground and background are set to default, and mirror set to none. Clears cell decorators.
public static void Clear(this ISurface obj)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
Clear(ISurface, int, int)
Section titled “Clear(ISurface, int, int)”Clears a cell. Character is reset to 0, the foreground and background is set to default, and mirror is set to none. Clears cell decorators.
public static void Clear(this ISurface obj, int x, int y)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x location of the cell.
y int
The y location of the cell.
Clear(ISurface, int, int, int)
Section titled “Clear(ISurface, int, int, int)”Clears a segment of cells, starting from the left, extending to the right, and wrapping if needed. Character is reset to 0, the foreground and background is set to default, and mirror is set to none. Clears cell decorators.
public static void Clear(this ISurface obj, int x, int y, int length)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x position of the left end of the segment.
y int
The y position of the segment.
length int
The length of the segment. If it extends beyond the line, it will wrap to the next line. If it extends beyond the console, then it automatically ends at the last valid cell.
Remarks
Section titled “Remarks”This works similarly to printing a string of whitespace
Clear(ISurface, Rectangle)
Section titled “Clear(ISurface, Rectangle)”Clears an area of obj.Surface. Each cell is reset to its default state. Then, Glyph, foreground, and background, are reset to the surface’s default values.
public static void Clear(this ISurface obj, Rectangle area)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
area SadRogue.Primitives.Rectangle
The area to clear.
Clear(ISurface, IEnumerable<Point>)
Section titled “Clear(ISurface, IEnumerable<Point>)”Clears an area of obj.Surface. Each cell is reset to its default state. Then, Glyph, foreground, and background, are reset to the surface’s default values.
public static void Clear(this ISurface obj, IEnumerable<Point> cellPositions)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
cellPositions IEnumerable<Point>
The cells to clear.
Fill(ISurface, ColoredGlyphBase)
Section titled “Fill(ISurface, ColoredGlyphBase)”Fills the console. Clears cell decorators and effects.
public static ColoredGlyphBase[] Fill(this ISurface obj, ColoredGlyphBase iconAppearance)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
iconAppearance ColoredGlyphBase
The appearance that is copied to every cell.
Returns
Section titled “Returns”ColoredGlyphBase[]
The array of all cells in this console, starting from the top left corner.
Fill(ISurface, Color?, Color?, int?, Mirror?)
Section titled “Fill(ISurface, Color?, Color?, int?, Mirror?)”Fills the console. Clears cell decorators and effects.
public static ColoredGlyphBase[] Fill(this ISurface obj, Color? foreground = null, Color? background = null, int? glyph = null, Mirror? mirror = null)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
foreground System.NullableSadRogue.Primitives.Color
Foreground to apply. If null, skips.
background System.NullableSadRogue.Primitives.Color
Foreground to apply. If null, skips.
glyph int?
Glyph to apply. If null, skips.
mirror Mirror?
Mirror to apply. If null, skips.
Returns
Section titled “Returns”ColoredGlyphBase[]
The array of all cells in this console, starting from the top left corner.
Fill(ISurface, int, int, int, Color?, Color?, int?, Mirror?)
Section titled “Fill(ISurface, int, int, int, Color?, Color?, int?, Mirror?)”Fills a segment of cells, starting from the left, extending to the right, and wrapping if needed. Clears cell decorators.
public static ColoredGlyphBase[] Fill(this ISurface obj, int x, int y, int length, Color? foreground = null, Color? background = null, int? glyph = null, Mirror? mirror = null)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x position of the left end of the segment.
y int
The y position of the segment.
length int
The length of the segment. If it extends beyond the line, it will wrap to the next line. If it extends beyond the console, then it automatically ends at the last valid cell.
foreground System.NullableSadRogue.Primitives.Color
Foreground to apply. If null, skips.
background System.NullableSadRogue.Primitives.Color
Background to apply. If null, skips.
glyph int?
Glyph to apply. If null, skips.
mirror Mirror?
Mirror to apply. If null, skips.
Returns
Section titled “Returns”ColoredGlyphBase[]
An array containing the affected cells, starting from the top left corner. If x or y are out of bounds, nothing happens and an empty array is returned
Fill(ISurface, Rectangle, Color?, Color?, int?, Mirror?)
Section titled “Fill(ISurface, Rectangle, Color?, Color?, int?, Mirror?)”Fills the specified area. Clears cell decorators.
public static ColoredGlyphBase[] Fill(this ISurface obj, Rectangle area, Color? foreground = null, Color? background = null, int? glyph = null, Mirror? mirror = null)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
area SadRogue.Primitives.Rectangle
The area to fill.
foreground System.NullableSadRogue.Primitives.Color
Foreground to apply. If null, skips.
background System.NullableSadRogue.Primitives.Color
Background to apply. If null, skips.
glyph int?
Glyph to apply. If null, skips.
mirror Mirror?
Mirror to apply. If null, skips.
Returns
Section titled “Returns”ColoredGlyphBase[]
An array containing the affected cells, starting from the top left corner. If the area is out of bounds, nothing happens and an empty array is returned.
DrawLine(ISurface, Point, Point, int?, Color?, Color?, Mirror?)
Section titled “DrawLine(ISurface, Point, Point, int?, Color?, Color?, Mirror?)”Draws a line from start to end.
public static IEnumerable<ColoredGlyphBase> DrawLine(this ISurface obj, Point start, Point end, int? glyph, Color? foreground = null, Color? background = null, Mirror? mirror = null)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
start SadRogue.Primitives.Point
Starting point of the line.
end SadRogue.Primitives.Point
Ending point of the line.
glyph int?
Glyph to set. If null, skipped.
foreground System.NullableSadRogue.Primitives.Color
Foreground to set. If null, skipped.
background System.NullableSadRogue.Primitives.Color
Background to set. If null, skipped.
mirror Mirror?
Mirror to set. If null, skipped.
Returns
Section titled “Returns”IEnumerable<ColoredGlyphBase>
A list of cells the line touched; ordered from first to last.
Remarks
Section titled “Remarks”To simply return the list of cells that would be drawn to, use null for glyph, foreground, background, and mirror.
DrawBox(ISurface, Rectangle, ShapeParameters)
Section titled “DrawBox(ISurface, Rectangle, ShapeParameters)”Draws a box.
public static void DrawBox(this ISurface obj, Rectangle area, ShapeParameters parameters)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
area SadRogue.Primitives.Rectangle
The area of the box.
parameters ShapeParameters
Provides the options for drawing a border and filling the box.
DrawCircle(ISurface, Rectangle, ShapeParameters)
Section titled “DrawCircle(ISurface, Rectangle, ShapeParameters)”Draws an ellipse.
public static void DrawCircle(this ISurface obj, Rectangle area, ShapeParameters parameters)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
area SadRogue.Primitives.Rectangle
The area the ellipse
parameters ShapeParameters
Provides the options for drawing a border and filling the circle.
ConnectLines(ISurface)
Section titled “ConnectLines(ISurface)”Connects all lines in a surface for both ConnectedLineThin and ConnectedLineThick styles.
public static void ConnectLines(this ISurface obj)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
ConnectLines(ISurface, int[])
Section titled “ConnectLines(ISurface, int[])”Connects all lines in this based on the lineStyle style provided.
public static void ConnectLines(this ISurface obj, int[] lineStyle)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
lineStyle int[]
The array of line styles indexed by ICellSurface.ConnectedLineIndex.
ConnectLines(ISurface, int[], Rectangle)
Section titled “ConnectLines(ISurface, int[], Rectangle)”Connects all lines in this based on the lineStyle style provided.
public static void ConnectLines(this ISurface obj, int[] lineStyle, Rectangle area)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
lineStyle int[]
The array of line styles indexed by ICellSurface.ConnectedLineIndex.
area SadRogue.Primitives.Rectangle
The area to process.
Copy(ISurface, ICellSurface)
Section titled “Copy(ISurface, ICellSurface)”Copies the contents of the cell surface to the destination.
public static void Copy(this ISurface obj, ICellSurface destination)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
destination ICellSurface
The destination obj.Surface.
Remarks
Section titled “Remarks”If the sizes to not match, it will always start at 0,0 and work with what it can and move on to the next row when either surface runs out of columns being processed
Copy(ISurface, ICellSurface, int, int)
Section titled “Copy(ISurface, ICellSurface, int, int)”Copies the contents of the cell surface to the destination at the specified x,y.
public static void Copy(this ISurface obj, ICellSurface destination, int x, int y)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
destination ICellSurface
The destination obj.Surface.
x int
The x coordinate of the destination.
y int
The y coordinate of the destination.
Copy(ISurface, Rectangle, ICellSurface, int, int)
Section titled “Copy(ISurface, Rectangle, ICellSurface, int, int)”Copies an area of this cell surface to the destination surface.
public static void Copy(this ISurface obj, Rectangle area, ICellSurface destination, int destinationX, int destinationY)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
area SadRogue.Primitives.Rectangle
The area to copy.
destination ICellSurface
The destination obj.Surface.
destinationX int
The x coordinate to copy to.
destinationY int
The y coordinate to copy to.
Copy(ISurface, int, int, int, int, ICellSurface, int, int)
Section titled “Copy(ISurface, int, int, int, int, ICellSurface, int, int)”Copies the contents of this cell surface at the specified x,y coordinates to the destination, only with the specified obj.Surface.BufferWidth and obj.Surface.BufferHeight, and copies it to the specified destinationX and destinationY position.
public static void Copy(this ISurface obj, int x, int y, int width, int height, ICellSurface destination, int destinationX, int destinationY)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
x int
The x coordinate to start from.
y int
The y coordinate to start from.
width int
The BufferWidth to copy from.
height int
The BufferHeight to copy from.
destination ICellSurface
The destination obj.Surface.
destinationX int
The x coordinate to copy to.
destinationY int
The y coordinate to copy to.
FillWithRandomGarbage(ISurface, IFont)
Section titled “FillWithRandomGarbage(ISurface, IFont)”Fills a console with random colors and glyphs.
public static void FillWithRandomGarbage(this ISurface obj, IFont associatedFont)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
associatedFont IFont
The font used in assigning glyphs randomly.
FillWithRandomGarbage(ISurface, int)
Section titled “FillWithRandomGarbage(ISurface, int)”Fills a console with random colors and glyphs.
public static void FillWithRandomGarbage(this ISurface obj, int maxGlyphValue)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
maxGlyphValue int
The maximum glyph value to use on the obj.Surface.
FillWithRandomGarbage(ISurface, int, Rectangle)
Section titled “FillWithRandomGarbage(ISurface, int, Rectangle)”Fills a console with random colors and glyphs.
public static void FillWithRandomGarbage(this ISurface obj, int maxGlyphValue, Rectangle area)Parameters
Section titled “Parameters”obj ISurface
The surface being edited.
maxGlyphValue int
The maximum glyph value to use on the obj.Surface.
area SadRogue.Primitives.Rectangle
The area to fill with random garbage.
PrintTheDraw(ICellSurface, int, string, TheDrawFont, HorizontalAlignment, int)
Section titled “PrintTheDraw(ICellSurface, int, string, TheDrawFont, HorizontalAlignment, int)”Prints text using TheDrawFont and horizontal alignment specified. Calculates x coordinate. Truncates string to fit it in one line.
public static void PrintTheDraw(this ICellSurface cellSurface, int y, string text, TheDrawFont drawFont, HorizontalAlignment alignment, int padding = 0)Parameters
Section titled “Parameters”cellSurface ICellSurface
Class implementing ICellSurface.
y int
Y coordinate of the obj.Surface.
text string
Text to print.
drawFont TheDrawFont
Instance of the TheDrawFont to use.
alignment HorizontalAlignment
HorizontalAlignment to use.
padding int
Amount of regular font characters used as horizontal padding on both sides of the output.
PrintTheDraw(ICellSurface, int, int, string, TheDrawFont)
Section titled “PrintTheDraw(ICellSurface, int, int, string, TheDrawFont)”Prints text using TheDrawFont.
public static void PrintTheDraw(this ICellSurface cellSurface, int x, int y, string text, TheDrawFont drawFont)Parameters
Section titled “Parameters”cellSurface ICellSurface
Class implementing ICellSurface.
x int
X coordinate of the obj.Surface.
y int
Y coordinate of the obj.Surface.
text string
Text to print.
drawFont TheDrawFont
Instance of the TheDrawFont to use.