# Sandbox.Bitmap.SetDashedPen

```csharp
void SetDashedPen(Color color, float width, float[] dashPattern)
```

Sets the pen for drawing dashed or dotted lines.

### Parameters

- `color` (`Color`): The color of the pen.
- `width` (`float`): The width of the pen in pixels.
- `dashPattern` (`float[]`): An array defining the dash pattern (e.g., [10, 5] for 10px dash, 5px gap).

Declared in [Sandbox.Bitmap](/api/Sandbox.Bitmap).
Assembly: `Sandbox.Engine`.
