---
title: "Path.Widen Method (Pen)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Path_Widen_1_00aeac81.htm
archived: false
applies_to:
  - product: "Graphics Mill"
    versions: ["12.1", "6.x-12.x (may differ)"]
    entity_id: "https://www.graphicsmill.com/#software-application"
---

# Path.Widen Method (Pen)

**Applies to:** Graphics Mill 12.1, 6.x-12.x (may differ)
 
Replaces the path with the outline of its stroke drawn with the specified pen.
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public void Widen(Pen pen
)
```
 
### Parameters
 
 - pen
     - Type: [Aurigma.GraphicsMill.Drawing.Pen](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Pen.htm.md)
The pen. Its width, line join, line cap, miter limit, dash pattern, and dash offset are used.
 
## Remarks
  
A subpath that ends with [Close()](https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Path_Close.htm.md) is a closed outline, and its stroke is a ring. Any other subpath is an open line, and its ends get the line cap of the pen. The dash lengths are in path units.
 
Round corners and caps deviate from the true arc by at most 0.1. Curves are converted to polylines first.
 
## Examples
  
```csharp
var path = new Path();
path.MoveTo(20, 120);
path.LineTo(55, 30);
path.LineTo(95, 120);
path.LineTo(130, 30);

var original = new Path(path);

var pen = new Pen(RgbColor.Black, 14f)
{
    LineJoin = LineJoin.Round,
    LineCap = LineCap.Round
};

// Replace the line with the outline of its stroke.
path.Widen(pen);
```
 
The original path and the widened path.
 ![The original path and the widened path.](https://www.graphicsmill.com/docs/gm/PathWiden.png)
 
## Exceptions
  
|  Exception |  Condition |
| --- | --- |
 |  System.ArgumentNullException |  The pen is `null`. |
 |  System.ArgumentOutOfRangeException |  The pen width is not greater than 0, or the miter limit is less than 1. |
   
## See Also

### Reference

- [Path Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Path.htm.md)
- [Widen Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_Drawing_Path_Widen.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)

### Manual

- [Working with Paths](https://www.graphicsmill.com/docs/gm/working-with-path.htm.md)
