Class TwoDimensionalBuffer<TItem>
Implements two dimensional buffer which has width and height. Items of this buffer can be accessed using X and Y indexes.
public class TwoDimensionalBuffer<TItem> : BaseObject, IBaseObject
Type Parameters
TItemType of the item.
- Inheritance
-
TwoDimensionalBuffer<TItem>
- Implements
- Extension Methods
Constructors
- TwoDimensionalBuffer(int, int)
Initializes a new instance of the TwoDimensionalBuffer<TItem> class.
Properties
- Data
Get an array with data.
- Height
Gets vertical size (number of rows).
- this[int]
Gets or sets the item at the specified offset.
- this[int, int]
Gets or sets the item at the specified X and Y indexes.
- Width
Gets horizontal size (row width, number of columns).
Methods
- GetColumnItems(int)
Enumerates all items in the specified column.
- GetData(int)
Gets data from the cell specified with the offset.
- GetData(int, int)
Gets data from the cell specified with X and Y coordinates.
- GetItems()
Gets the item at the specified X and Y indexes.
- GetOffset(int, int)
Gets the offset in data for the specified X and Y. Returns -1 if X is outside [0, Width - 1] or Y is outside [0, Height - 1].
- GetRowItems(int)
Enumerates all items in the specified row.
- IsValidOffset(int)
Gets whether the specified offset is valid.
- SetData(int, int, TItem)
Sets data in the cell specified by X and Y coordinates.
- SetData(int, TItem)
Sets data in the cell specified with the offset.