Esempio n. 1
0
        /// <summary>
        /// Applies a transform function over the current state of all pixels
        /// </summary>
        /// <param name="map">A Func of the form (inputPixel,index) => outputPixel</param>
        public static void Apply(this IPixelRenderer renderer, Func <uint, int, uint> map)
        {
            var pixels = renderer.GetPixels();
            var output = pixels.Select(map).ToArray();

            renderer.SetPixels(output);
        }
Esempio n. 2
0
        public uint[] GetPixels()
        {
            var mapped = _renderer.GetPixels();
            var pixels = UnTranspose(mapped);

            return(pixels);
        }