Skip to content

LineStyle.GetPen method

Creates a pen that matches this style.

Namespace: Eremex.AvaloniaUI.Charts
Assembly: Eremex.Avalonia.Charts.dll
NuGet Package: Eremex.Avalonia.Controls

Declaration

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 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