Exemple #1
0
        private byte[] GetPixelsInternal(Ws281x_channel_t channel)
        {
            var buffer = new byte[channel.count * 4];

            Marshal.Copy(channel.leds, buffer, 0, buffer.Length);
            return(buffer);
        }
Exemple #2
0
 private void SetPixelsInternal(Ws281x_channel_t channel, byte[] pixels)
 {
     Marshal.Copy(pixels, 0, channel.leds, pixels.Length);
 }
Exemple #3
0
        private void SetPixelsInternal(Ws281x_channel_t channel, uint[] pixels)
        {
            var blittable = (int[])(object)pixels;

            Marshal.Copy(blittable, 0, channel.leds, blittable.Length);
        }