Skip to content

PdfPen class

View as Markdown

Namespace: PdfNetStack.Drawing
Assembly: PdfNetStack.dll
Package: PdfNetStack

How lines and outlines are stroked. Immutable; use with to derive variants.

public sealed record PdfPen : IEquatable<PdfPen>

Inheritance

object ← PdfPen

Implements

IEquatable<PdfPen>

Creates a solid pen.

public PdfPen(PdfColor color, double width = 1)

color PdfColor

Stroke color.

width double

Line width in points. 0 draws the thinnest line the device can show.

A 1 point black pen.

public static PdfPen Black { get; }

PdfPen

Stroke color.

public PdfColor Color { get; init; }

PdfColor

Offset into the dash pattern where the line starts.

public double DashOffset { get; init; }

double

Alternating dash and gap lengths in points; empty for a solid line.

public IReadOnlyList<double> DashPattern { get; init; }

IReadOnlyList<double>

End shape. Default butt.

public PdfLineCap LineCap { get; init; }

PdfLineCap

Corner shape. Default miter.

public PdfLineJoin LineJoin { get; init; }

PdfLineJoin

Miter limit, at least 1. Default 10, as in PDF.

public double MiterLimit { get; init; }

double

Line width in points.

public double Width { get; init; }

double