示例#1
0
 private void ReleaseUnmanagedResources()
 {
     if (_matrix != IntPtr.Zero)
     {
         PiNativeMethods.DeleteMatrix(_matrix);
     }
 }
示例#2
0
        public PiRgbMatrix(int numCells)
        {
            Validate.Range(numCells, 1, 2);

            Width  = 32 * numCells;
            Height = 32;

            _matrix = PiNativeMethods.CreateMatrix(Height, numCells);

            Clear();
        }
示例#3
0
 public void SetWriteCycles(byte writeCycles)
 {
     PiNativeMethods.SetMatrixWriteCycles(_matrix, writeCycles);
 }
示例#4
0
 public void SetPwmBits(byte bits)
 {
     PiNativeMethods.SetMatrixPwmBits(_matrix, bits);
 }
示例#5
0
        public void SetPixel(int x, int y, RgbColor color)
        {
            Validate.XY(x, y, Width, Height);

            PiNativeMethods.SetMatrixPixel(_matrix, x, y, color.R, color.G, color.B);
        }
示例#6
0
 public void Fill(RgbColor color)
 {
     PiNativeMethods.FillMatrix(_matrix, color.R, color.G, color.B);
 }
示例#7
0
 public void Clear()
 {
     PiNativeMethods.ClearMatrix(_matrix);
 }