Class ByteMatrix
JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned 0, 1 and 2 I'm going to use less memory and go with bytes.
public sealed class ByteMatrix
- Inheritance
-
ByteMatrix
- Inherited Members
Constructors
ByteMatrix(int, int)
Initializes a new instance of the ByteMatrix class.
public ByteMatrix(int width, int height)
Parameters
Properties
Array
an internal representation as bytes, in row-major order. array[y][x] represents point (x,y)
public byte[][] Array { get; }
Property Value
- byte[][]
Height
Gets the height.
public int Height { get; }
Property Value
this[int, int]
Gets or sets the int with the specified x.
public int this[int x, int y] { get; set; }
Parameters
Property Value
Width
Gets the width.
public int Width { get; }
Property Value
Methods
ToString()
Returns a string that represents this instance.
public override string ToString()
Returns
clear(byte)
Clears the specified value.
public void clear(byte value)
Parameters
value
byteThe value.
set(int, int, bool)
Sets the specified x.
public void set(int x, int y, bool value)
Parameters
set(int, int, byte)
Sets the specified x.
public void set(int x, int y, byte value)