using System; namespace DataMatrix4Net { public class MyBitMatrix : Gma.QrCodeNet.Encoding.BitMatrix { /// /// Public interface /// public override int Width { get { return width; } } public override int Height { get { return height; } } public override bool[,] InternalArray { get { return internalArray; } } /// public override bool this[int i, int j] { get { return (i >= 0 && j >= 0 && i < width && j < height) ? internalArray[i, j] : false; } set { if (i >= 0 && j >= 0 && i < width && j < height) internalArray[i, j] = value; } } /// /// Private members /// readonly int width; readonly int height; readonly bool[,] internalArray; /// /// Public constructor /// /// Matrix width /// Matrix height public MyBitMatrix(int width, int height) { this.width = width; this.height = height; internalArray = new bool[width, height]; } } }