Animatroller.Framework.LogicalDevice.PixelMapper2D.GetByteArray C# (CSharp) Method

GetByteArray() public method

public GetByteArray ( Color colorData ) : byte[]
colorData Color
return byte[]
        public byte[] GetByteArray(Color[,] colorData)
        {
            for (int y = 0; y < this.height; y++)
                for (int x = 0; x < this.width; x++)
                {
                    int pos = this.lookupXY[x, y] * 3;
                    var color = colorData[x, y];

                    this.streamOutput[pos] = color.R;
                    this.streamOutput[pos + 1] = color.G;
                    this.streamOutput[pos + 2] = color.B;
                }

            return this.streamOutput;
        }