SpriteBatchExtensions

SpriteBatchExtensions is a public static class in the Extensions Namespace. It contains extension methods for XNA's SpriteBatch class. Parts of this class were taken from the first attempt, and the DrawRectangle were written by fbrookie.

Draw
This is a modification of one of the regular Draw overloads with a SpriteEffects parameter that only accepts a Rectangle for positioning; this method has a Vector2 for positioning.

DrawRectangle
Draws a black rectangle within the specified rectangle.

DrawRectangle
Draws a rectangle with a specified color.

DrawRectangle
Draws a rectangle with the top-left corner at start and the bottom-right corner at end of the specified color.

DrawRectangle
Draws a rectangle at a position of x and y, with a width, height, and specified color.

DrawRectangleEdges
Draws a rectangular outline at a position, with a size and a color.

DrawRectangleEdges
Draws a rectangular outline of a color within the bounds of rect.

DrawLine
Draws a straight line between two points, with a width and color.