Skip to content

PDFPen

Namespace: O2S.Components.PDF4NET.Graphics

Defines a PDF pen.

public class PDFPen

Inheritance ObjectPDFPen

Remarks

The pen is used to stroke a path with a color.

Constructors

PDFPen(PDFColor, Double)

Initializes a new PDFPen object.

public PDFPen(PDFColor color, double width)

Parameters

color PDFColor
Pen color.

width Double
Pen width.


PDFPen()

Initializes a new PDFPen object with a default RGB black color and a width of 1 point.

public PDFPen()

PDFPen(PDFPen)

Initializes a new PDFPen object with another pen.

public PDFPen(PDFPen pen)

Parameters

pen PDFPen
Source pen.


Properties

Color

Gets or sets the pen color.

public PDFColor Color { get; set; }

Property Value

PDFColor
The pen color.


DashOffset

Gets or sets the dash offset.

public double DashOffset { get; set; }

Property Value

Double
The distance from the start of a line to the beginning of a dash pattern.


DashPattern

Gets or sets the dash pattern.

public Double[] DashPattern { get; set; }

Property Value

Double[]
An array of custom dashes and spaces.


LineCap

Gets or sets the line cap style.

public PDFLineCap LineCap { get; set; }

Property Value

PDFLineCap
The line cap style.


LineJoin

Gets or sets the line join style.

public PDFLineJoin LineJoin { get; set; }

Property Value

PDFLineJoin
The line join style.


Width

Gets or sets the pen width.

public double Width { get; set; }

Property Value

Double
The width of the pen.