示例#1
0
        public RectTable(int w, int h, T defval)
        {
            this.w = w;
            this.h = h;

            _table = new AutoTable <T>(defval);
        }
示例#2
0
        public void AddTable(AutoTable <T> table)
        {
            for (int y = 0; y < table.Height; y++)
            {
                this.AddRow();

                for (int x = 0; x < table.GetWidth(y); x++)
                {
                    this.Add(table[x, y]);
                }
            }
        }
示例#3
0
        public void Twist()
        {
            AutoTable <T> dest = new AutoTable <T>(_defval);

            for (int x = 0; x < _w; x++)
            {
                for (int y = 0; y < _h; y++)
                {
                    dest[y, x] = this[x, y];
                }
            }

            this.Capture(dest);
        }
示例#4
0
 private void Capture(AutoTable <T> target)
 {
     _rows = target._rows;
     _w    = target._w;
     _h    = target._h;
 }