Paint.PaintApp.RenderImage C# (CSharp) Method

RenderImage() private method

Renders a specific source RenderTarget on to a specific target RenderTarget
private RenderImage ( RenderTarget2D target, RenderTarget2D source ) : void
target Microsoft.Xna.Framework.Graphics.RenderTarget2D Where we want to render the image
source Microsoft.Xna.Framework.Graphics.RenderTarget2D The source image we wish to render
return void
        private void RenderImage(RenderTarget2D target, RenderTarget2D source)
        {
            GraphicsDevice device = this.GraphicsDeviceManager.GraphicsDevice;
            device.SetRenderTarget(target);
            this.SpriteBatch.Begin();
            device.Clear(this.BackgroundColor);
            this.SpriteBatch.Draw(source, Vector2.Zero, this.BackgroundColor);
            this.SpriteBatch.End();
        }