# Sandbox.Bitmap.DrawRect

## Overload 1

```csharp
void DrawRect(Rect rect)
```

Draws a rectangle using the current pen settings.

### Parameters

- `rect` (`Rect`): The rectangle to draw.

## Overload 2

```csharp
void DrawRect(float x, float y, float width, float height)
```

Draws a rectangle using the current pen settings.

### Parameters

- `x` (`float`): The x-coordinate of the top-left corner.
- `y` (`float`): The y-coordinate of the top-left corner.
- `width` (`float`): The width of the rectangle.
- `height` (`float`): The height of the rectangle.

Declared in [Sandbox.Bitmap](/api/Sandbox.Bitmap).
Assembly: `Sandbox.Engine`.
