Animatroller.Framework.Utility.PixelMapping.MapPixelRGB C# (CSharp) Method

MapPixelRGB() private static method

private static MapPixelRGB ( PixelMap[]>.Dictionary pixelMapping, int x, int y, int &universe, int &mappingPos, RgbOrder rgbOrder, int channelShift ) : void
pixelMapping PixelMap[]>.Dictionary
x int
y int
universe int
mappingPos int
rgbOrder RgbOrder
channelShift int
return void
        private static void MapPixelRGB(Dictionary<int, PixelMap[]> pixelMapping, int x, int y, ref int universe, ref int mappingPos, RgbOrder rgbOrder, int channelShift)
        {
            switch (rgbOrder)
            {
                case RgbOrder.RGB:
                    MapPixel(pixelMapping, universe, ColorComponent.R, x, y, ref mappingPos);
                    MapPixel(pixelMapping, universe, ColorComponent.G, x, y, ref mappingPos);
                    MapPixel(pixelMapping, universe, ColorComponent.B, x, y, ref mappingPos);
                    break;
            }

            if (mappingPos + 2 >= 512)
            {
                // Skip to the next universe when we can't fit a full RGB pixel in the current universe
                universe++;
                mappingPos = channelShift;
            }
        }