ARCed.XnaExtensions.DrawRectangle C# (CSharp) Method

DrawRectangle() public static method

Draws a rectangle with given location, size, color, and border width.
public static DrawRectangle ( this batch, int x, int y, int width, int height, Microsoft.Xna.Framework.Color color, int border = 1 ) : void
batch this SpriteBatch to draw the rectangle.
x int Coordinate of the rectangle on the x-axis
y int Coordinate of the rectangle on the y-axis
width int Width of the rectangle in pixels
height int Height of the rectangle in pixels
color Microsoft.Xna.Framework.Color Color of the rectangle border
border int Width of the border in pixels
return void
        public static void DrawRectangle(this SpriteBatch batch, int x, int y,
            int width, int height, Color color, int border = 1)
        {
            var rect = new Rectangle(x, y, width, height);
            DrawRectangle(batch, rect, color, border);
        }

Same methods

XnaExtensions::DrawRectangle ( this batch, Rectangle rect, Microsoft.Xna.Framework.Color color, int border = 1 ) : void