Table of Contents

Method GetAsPen

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

GetAsPen(float)

Gets this color as Pen with the specified width. This method caches pens with integer widths using GetPen(int). Pens with non-integer widths are not cached.

public Pen GetAsPen(float width = 1)

Parameters

width float

Width of the pen.

Returns

Pen

Remarks

The difference between this method and GetPen(int) is that this method accepts float values.

GetAsPen(float, DashStyle)

Gets this color as Pen with the specified width and DashStyle.

public Pen GetAsPen(float width, DashStyle dashStyle)

Parameters

width float

Width of the pen. Optional. Default is 1.

dashStyle DashStyle

Dash style of the pen. Optional. Default is Solid.

Returns

Pen