Pen(Brush, Single) Constructor

Initializes a new instance of the Pen class with the specified brush and width.

Definition

Namespace: KGySoft.Drawing.Shapes
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.0-rc.1
C#
public Pen(
	Brush brush,
	float width = 1f
)

Parameters

brush  Brush
The Brush that determines the color or texture of the Pen.
width  Single  (Optional)
The width of the Pen. Must be greater than 0. This parameter is optional.
Default value: 1.

Remarks

A width of 1/64 or less is not visible. If FastThinLines is and AntiAliasing is , then a width less than 1/4 is not visible.

Exceptions

ArgumentNullExceptionbrush is .
ArgumentOutOfRangeExceptionwidth is not greater than 0.

See Also