Table of Contents

Class SolidPen

Namespace
SixLabors.ImageSharp.Drawing.Processing
Assembly
SixLabors.ImageSharp.Drawing.dll

Defines a pen that can apply a pattern to a line with a set brush and thickness.

public class SolidPen : Pen, IEquatable<Pen>
Inheritance
SolidPen
Implements
Inherited Members

Constructors

SolidPen(Color)

Initializes a new instance of the SolidPen class.

public SolidPen(Color color)

Parameters

color Color

The color.

SolidPen(Color, float)

Initializes a new instance of the SolidPen class.

public SolidPen(Color color, float width)

Parameters

color Color

The color.

width float

The width.

SolidPen(Brush)

Initializes a new instance of the SolidPen class.

public SolidPen(Brush strokeFill)

Parameters

strokeFill Brush

The brush used to fill the stroke outline.

SolidPen(Brush, float)

Initializes a new instance of the SolidPen class.

public SolidPen(Brush strokeFill, float strokeWidth)

Parameters

strokeFill Brush

The brush used to fill the stroke outline.

strokeWidth float

The stroke width in the path's local coordinate space before any drawing transform is applied.

SolidPen(PenOptions)

Initializes a new instance of the SolidPen class.

public SolidPen(PenOptions options)

Parameters

options PenOptions

The pen options.

Methods

Equals(Pen?)

Indicates whether the current object is equal to another object of the same type.

public override bool Equals(Pen? other)

Parameters

other Pen

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GeneratePath(IPath, float)

Applies the styling from the pen to a path and generate a new path with the final vector.

public override IPath GeneratePath(IPath path, float strokeWidth)

Parameters

path IPath

The source path

strokeWidth float

The stroke width in the path's local coordinate space before any drawing transform is applied.

Returns

IPath

The IPath with the pen styling applied.