PathfindingTest.Map.MiniMap.DrawScreenRectangle C# (CSharp) Method

DrawScreenRectangle() private method

Draws the screen rectangle
private DrawScreenRectangle ( SpriteBatch sb ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch SpriteBatch to draw on.
return void
        private void DrawScreenRectangle(SpriteBatch sb)
        {
            Point screenTopLeftOnMinimap = this.MapToMiniMap(Game1.GetInstance().GetScreenLocation());
            Point screenSize = this.MapToMiniMap(
                new Point(Game1.GetInstance().GetScreenBounds().Width, Game1.GetInstance().GetScreenBounds().Height));
            // The percentage of the screen
            Rectangle screenRect = new Rectangle(this.currentDrawRectangle.X + screenTopLeftOnMinimap.X,
                this.currentDrawRectangle.Y + screenTopLeftOnMinimap.Y,
                screenSize.X,
                screenSize.Y
                /*(int)((this.map.collisionMap.windowSize.Width / (float)this.map.collisionMap.mapWidth) * this.miniMapTexture.Width),
                (int)((this.map.collisionMap.windowSize.Height / (float)this.map.collisionMap.mapHeight) * this.miniMapTexture.Height)*/);
            DrawUtil.DrawClearRectangle(sb, screenRect, 1, this.rectangleColor, this.z - 0.00002f);
        }