Example #1
0
 public byte[] GetBlockArray()
 {
     DFFrameBlock block = GetBlock();
     byte[] temp = block.ToArray();
     block.Free();
     return temp;
 }
Example #2
0
        public void SetBlock(DFFrameBlock block)
        {
            if (IsFull)
            {
                throw new ArgumentOutOfRangeException();
            }
            int x   = _blockPos % _width;
            int y   = _blockPos / _width;
            Mat ROI = _mat.SubMat(new Rect(x, y, 8, 8));

            block.Body.CopyTo(ROI);
            BlockPointerInc();
        }
Example #3
0
 public void SetBlock(DFFrameBlock block)
 {
     foreach(DFFrameSub sub in _frames)
     {
         if(sub.IsFull)
         {
             continue;
         }
         sub.SetBlock(block);
         return;
         
     }
     throw new IndexOutOfRangeException();
 }
Example #4
0
        public DFFrameBlock GetBlock()
        {
            if (IsFull)
            {
                throw new ArgumentOutOfRangeException();
            }
            int          x     = _blockPos % _width;
            int          y     = _blockPos / _width;
            Mat          ROI   = _mat.SubMat(new Rect(x, y, 8, 8));
            DFFrameBlock block = new DFFrameBlock();

            ROI.CopyTo(block.Body);
            BlockPointerInc();
            return(block);
        }
Example #5
0
 public void SetBlockArray(byte[] array)
 {
     DFFrameBlock block = new DFFrameBlock(array);
     SetBlock(block);
     block.Free();
 }