# Sandbox.Rendering.HudPainter.DrawLine

```csharp
void DrawLine(Vector2 a, Vector2 b, float width, Color color, Vector4 corners = null)
```

Draws a line between two points with the specified width and color.

### Parameters

- `a` (`Vector2`): The start point of the line.
- `b` (`Vector2`): The end point of the line.
- `width` (`float`): The width of the line.
- `color` (`Color`): The color of the line.
- `corners` (`Vector4`), default `null`: Optional corner flags for line end caps.

Declared in [Sandbox.Rendering.HudPainter](/api/Sandbox.Rendering.HudPainter).
Assembly: `Sandbox.Engine`.
