Table of Contents

Struct PenOptions

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

Provides a set of configurations options for pens.

public struct PenOptions
Inherited Members

Constructors

PenOptions(Color, float)

Initializes a new instance of the PenOptions struct.

public PenOptions(Color color, float strokeWidth)

Parameters

color Color

The color.

strokeWidth float

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

PenOptions(Color, float, float[]?)

Initializes a new instance of the PenOptions struct.

public PenOptions(Color color, float strokeWidth, float[]? strokePattern)

Parameters

color Color

The color.

strokeWidth float

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

strokePattern float[]

The stroke pattern.

PenOptions(Color, float, float[], float)

Initializes a new instance of the PenOptions struct.

public PenOptions(Color color, float strokeWidth, float[] strokePattern, float strokePatternOffset)

Parameters

color Color

The color.

strokeWidth float

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

strokePattern float[]

The stroke pattern.

strokePatternOffset float

The distance into the stroke pattern, expressed as a multiple of strokeWidth.

PenOptions(Brush, float, float[]?)

Initializes a new instance of the PenOptions struct.

public PenOptions(Brush strokeFill, float strokeWidth, float[]? strokePattern)

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.

strokePattern float[]

The stroke pattern.

PenOptions(Brush, float, float[], float)

Initializes a new instance of the PenOptions struct.

public PenOptions(Brush strokeFill, float strokeWidth, float[] strokePattern, float strokePatternOffset)

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.

strokePattern float[]

The stroke pattern.

strokePatternOffset float

The distance into the stroke pattern, expressed as a multiple of strokeWidth.

PenOptions(float)

Initializes a new instance of the PenOptions struct.

public PenOptions(float strokeWidth)

Parameters

strokeWidth float

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

Properties

StrokeFill

Gets the brush used to fill the stroke outline. Defaults to SolidBrush.

public readonly Brush StrokeFill { get; }

Property Value

Brush

StrokeOptions

Gets or sets the stroke geometry options used to stroke paths drawn with this pen.

public StrokeOptions? StrokeOptions { readonly get; set; }

Property Value

StrokeOptions

StrokePattern

Gets the stroke pattern: alternating filled and empty segment lengths expressed as multiples of StrokeWidth, starting with a filled segment. An empty pattern produces a continuous stroke.

public readonly float[] StrokePattern { get; }

Property Value

float[]

StrokePatternOffset

Gets or sets the distance into the stroke pattern, expressed as a multiple of StrokeWidth.

public float StrokePatternOffset { readonly get; set; }

Property Value

float

StrokeWidth

Gets the stroke width in the path's local coordinate space before any drawing transform is applied. Defaults to 1.

public readonly float StrokeWidth { get; }

Property Value

float