Table of Contents

Class TwoDimensionalBuffer<T>

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Implements two dimensional buffer which has width and height. Items of this buffer can be accessed using X and Y indexes.

public class TwoDimensionalBuffer<T>

Type Parameters

T

Type of the item.

Inheritance
TwoDimensionalBuffer<T>

Constructors

TwoDimensionalBuffer(int, int)

Initializes a new instance of the TwoDimensionalBuffer<T> class.

Properties

Data

Get an array with data.

Height

Gets vertical size (number of rows).

Width

Gets horizontal size (row width, number of columns).

Methods

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.

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].

IsValidOffset(int)

Gets whether the specified offset is valid.

SetData(int, int, T)

Sets data in the cell specified by X and Y coordinates.

SetData(int, T)

Sets data in the cell specified with the offset.