Table of Contents

Method CreatePenInstance

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

CreatePenInstance(float)

Creates a new instance of a Pen with the specified width and default settings.

public virtual Pen CreatePenInstance(float width)

Parameters

width float

The width of the pen, in device-independent units (DIPs).

Returns

Pen

A new Pen instance configured with the specified width and default settings.

Remarks

The pen is created with a solid dash style, flat line caps, mitered line joins, and is immutable.

CreatePenInstance(float, DashStyle)

Creates a new instance of a Pen with the specified width, dash style, and default settings.

public virtual Pen CreatePenInstance(float width, DashStyle dash)

Parameters

width float

The width of the pen, represented as a float. Must be a positive value.

dash DashStyle

The dash style of the pen, specified as a DashStyle.

Returns

Pen

A new Pen instance configured with the specified width, dash style, and default settings for line caps, joins, and immutability.

Remarks

The created Pen is immutable and uses Flat for line caps and Miter for line joins.