# LineStyle.GetPen method

Creates a pen that matches this style.

**Namespace:** [`Eremex.AvaloniaUI.Charts`](../index.md)  
**Assembly:** `Eremex.Avalonia.Charts.dll`  
**NuGet Package:** [Eremex.Avalonia.Controls](https://www.nuget.org/packages/Eremex.Avalonia.Controls)

## Declaration

```csharp
public Pen GetPen(Color color, double scale)
```

## Parameters

| name | type | description |
| --- | --- | --- |
| color | `Color` | The color of the stroke. |
| scale | `double` | The factor by which [`Thickness`](./Thickness.md) is multiplied to obtain the width in device pixels. |

## Returns

| type | description |
| --- | --- |
| `Pen` | The pen built for the given color and scale. |

## Remarks

Results are cached, so repeated calls with the same arguments return the same pen.

## See Also

* class [LineStyle](../LineStyle.md)
* namespace [Eremex.AvaloniaUI.Charts](../index.md)

<!-- DO NOT EDIT: generated by xmldocmd for Eremex.Avalonia.Charts.dll -->
