Exemple #1
0
        public RgbaImage Blend()
        {
            var imageBuffer = new RgbaImage(_renderer.Width, _renderer.Height);

            Blend(imageBuffer);

            return(imageBuffer);
        }
Exemple #2
0
        public void Blend([NotNull] RgbaImage rgbaImage)
        {
            if (rgbaImage == null)
            {
                throw new ArgumentNullException(nameof(rgbaImage));
            }

            if (rgbaImage.Width < _renderer.Width || rgbaImage.Height < _renderer.Height)
            {
                throw new ArgumentException("Cannot blend into a buffer smaller than renderer size", nameof(rgbaImage));
            }

            unsafe {
                var image = GetTypedPointer();

                Blend(rgbaImage, image);
            }
        }