<PackageReference Include="System.Drawing.Common" Version="9.0.5" />

Pen

public sealed class Pen : MarshalByRefObject, ICloneable, IDisposable
Defines an object used to draw lines and curves. This class cannot be inherited.
public PenAlignment Alignment { get; set; }

Gets or sets the alignment for this Pen.

public Brush Brush { get; set; }

Gets or sets the Brush that determines attributes of this Pen.

public Color Color { get; set; }

Gets or sets the color of this Pen.

public float[] CompoundArray { get; set; }

Gets or sets an array of values that specifies a compound pen. A compound pen draws a compound line made up of parallel lines and spaces.

public CustomLineCap CustomEndCap { get; set; }

Gets or sets a custom cap to use at the end of lines drawn with this Pen.

public CustomLineCap CustomStartCap { get; set; }

Gets or sets a custom cap to use at the beginning of lines drawn with this Pen.

public DashCap DashCap { get; set; }

Gets or sets the cap style used at the end of the dashes that make up dashed lines drawn with this Pen.

public float DashOffset { get; set; }

Gets or sets the distance from the start of a line to the beginning of a dash pattern.

public float[] DashPattern { get; set; }

Gets or sets an array of custom dashes and spaces.

public DashStyle DashStyle { get; set; }

Gets or sets the style used for dashed lines drawn with this Pen.

public LineCap EndCap { get; set; }

Gets or sets the cap style used at the end of lines drawn with this Pen.

public LineJoin LineJoin { get; set; }

Gets or sets the join style for the ends of two consecutive lines drawn with this Pen.

public float MiterLimit { get; set; }

Gets or sets the limit of the thickness of the join on a mitered corner.

public PenType PenType { get; }

Gets the style of lines drawn with this Pen.

public LineCap StartCap { get; set; }

Gets or sets the cap style used at the beginning of lines drawn with this Pen.

public Matrix Transform { get; set; }

Gets or sets a copy of the geometric transformation for this Pen.

public float Width { get; set; }

Gets or sets the width of this Pen, in units of the Graphics object used for drawing.

public Pen(Brush brush)

Initializes a new instance of the Pen class with the specified Brush.

public Pen(Brush brush, float width)

Initializes a new instance of the Pen class with the specified Brush and Width.

public Pen(Color color)

Initializes a new instance of the Pen class with the specified color.

public Pen(Color color, float width)

Initializes a new instance of the Pen class with the specified Color and Width properties.

public object Clone()

Creates an exact copy of this Pen.

public void Dispose()

Releases all resources used by this Pen.

public void MultiplyTransform(Matrix matrix)

Multiplies the transformation matrix for this Pen by the specified Matrix.

public void MultiplyTransform(Matrix matrix, MatrixOrder order)

Multiplies the transformation matrix for this Pen by the specified Matrix in the specified order.

public void ResetTransform()

Resets the geometric transformation matrix for this Pen to identity.

public void RotateTransform(float angle)

Rotates the local geometric transformation by the specified angle. This method prepends the rotation to the transformation.

public void RotateTransform(float angle, MatrixOrder order)

Rotates the local geometric transformation by the specified angle in the specified order.

public void ScaleTransform(float sx, float sy)

Scales the local geometric transformation by the specified factors. This method prepends the scaling matrix to the transformation.

public void ScaleTransform(float sx, float sy, MatrixOrder order)

Scales the local geometric transformation by the specified factors in the specified order.

public void SetLineCap(LineCap startCap, LineCap endCap, DashCap dashCap)

Sets the values that determine the style of cap used to end lines drawn by this Pen.

public void TranslateTransform(float dx, float dy)

Translates the local geometric transformation by the specified dimensions. This method prepends the translation to the transformation.

public void TranslateTransform(float dx, float dy, MatrixOrder order)

Translates the local geometric transformation by the specified dimensions in the specified order.