Paint.BaseGame.DrawToolboxOnScreen C# (CSharp) Method

DrawToolboxOnScreen() private method

Draws the toolbox on screen.
private DrawToolboxOnScreen ( ) : void
return void
        private void DrawToolboxOnScreen()
        {
            Rectangle toolboxBounds =
                new Rectangle(
                    0,
                    0,
                    this.InMemoryToolboxRenderTarget.Width,
                    this.ToolBox.ToolboxHeight);

            Vector2 toolboxPosition = Vector2.Zero;
            if (this.ToolBox.DockPosition == DockPosition.Bottom)
            {
                toolboxPosition = new Vector2(0, InMemoryToolboxRenderTarget.Height - this.ToolBox.ToolboxHeight);
            }

            // Blank the square where the toolbox will go - this ensures that none of the canvas shows through where
            // there is transparency.
            this.GraphicsDisplay.DrawGraphic(
                ImageType.EmptySquare,
                new Rectangle((int)toolboxPosition.X, (int)toolboxPosition.Y, toolboxBounds.Width, toolboxBounds.Height),
                this.BackgroundColor);

            this.SpriteBatch.Draw(this.InMemoryToolboxRenderTarget, toolboxPosition, toolboxBounds, this.BackgroundColor);
        }