public static void DrawRect(SpriteBatch spriteBatch, Vector2 topLeft, Vector2 topRight, Vector2 bottomRight, Vector2 bottomLeft, Color color) { Utils.DrawLine(spriteBatch, topLeft, topRight, color); Utils.DrawLine(spriteBatch, topRight, bottomRight, color); Utils.DrawLine(spriteBatch, bottomRight, bottomLeft, color); Utils.DrawLine(spriteBatch, bottomLeft, topLeft, color); }
public static void DrawRect(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color) { Utils.DrawLine(spriteBatch, start, new Vector2(start.X, end.Y), color); Utils.DrawLine(spriteBatch, start, new Vector2(end.X, start.Y), color); Utils.DrawLine(spriteBatch, end, new Vector2(start.X, end.Y), color); Utils.DrawLine(spriteBatch, end, new Vector2(end.X, start.Y), color); }
public static void DrawLine(SpriteBatch spriteBatch, Point start, Point end, Color color) { Utils.DrawLine(spriteBatch, new Vector2((float)(start.X << 4), (float)(start.Y << 4)), new Vector2((float)(end.X << 4), (float)(end.Y << 4)), color); }