Table of Contents

Method SetStroke

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

SetStroke(IDeviceBrush?, float, ReadOnlySpan<float>, float)

Provides values to an SVG glyph for stroke properties. The brush with opacity set to 1 is used as the 'context-stroke'. The opacity of the brush is used as the 'context-stroke-opacity' value.

void SetStroke(IDeviceBrush? brush, float strokeWidth = 1, ReadOnlySpan<float> dashes = default, float dashOffset = 1)

Parameters

brush IDeviceBrush

Describes how the stroke is painted. A null brush will cause the context-stroke value to be none.

strokeWidth float

Specifies the 'context-value' for the 'stroke-width' property.

dashes ReadOnlySpan<float>

Specifies the 'context-value' for the 'stroke-dasharray' property. An empty span will cause the stroke-dasharray to be set to 'none'.

dashOffset float

Specifies the 'context-value' for the 'stroke-dashoffset' property.