Method CreatePenInstance
CreatePenInstance(float)
Creates a new instance of a Pen with the specified width and default settings.
public virtual Pen CreatePenInstance(float width)
Parameters
widthfloatThe width of the pen, in device-independent units (DIPs).
Returns
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
widthfloatThe width of the pen, represented as a float. Must be a positive value.
dashDashStyleThe 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.