PdfPen class Null safety

A class defining settings for drawing operations, that determines the color, width, and style of the drawing elements.

//Create a new PDF document.
PdfDocument doc = PdfDocument()
  ..pages.add().graphics.drawRectangle(
      //Create a new PDF pen instance.
      pen: PdfPen(PdfColor(255, 0, 0)),
      bounds: Rect.fromLTWH(0, 0, 200, 100));
//Save the document.
List<int> bytes = doc.save();
//Close the document.
doc.dispose();

Constructors

PdfPen(PdfColor pdfColor, {double width = 1.0, PdfDashStyle dashStyle = PdfDashStyle.solid, PdfLineCap lineCap = PdfLineCap.flat, PdfLineJoin lineJoin = PdfLineJoin.miter})
Initializes a new instance of the PdfPen class. [...]
PdfPen.fromBrush(PdfBrush brush, {double width = 1.0, PdfDashStyle dashStyle = PdfDashStyle.solid, PdfLineCap lineCap = PdfLineCap.flat, PdfLineJoin lineJoin = PdfLineJoin.miter})
Initializes a new instance of the PdfPen with PdfBrush. [...]

Properties

brush PdfBrush?
Gets or sets the brush, which specifies the pen behavior. [...]
read / write
color PdfColor
Gets or sets the color of the pen. [...]
read / write
dashOffset double
Gets or sets the dash offset of the pen. [...]
read / write
dashPattern List<double>
Gets or sets the dash pattern of the pen. [...]
read / write
dashStyle PdfDashStyle
Gets or sets the dash style of the pen. [...]
read / write
hashCode int
The hash code for this object. [...]
read-only, override
lineCap PdfLineCap
Gets or sets the line cap of the pen. [...]
read / write
lineJoin PdfLineJoin
Gets or sets the line join style of the pen. [...]
read / write
miterLimit double
Gets or sets the miter limit. [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
width double
Gets or sets the width of the pen. [...]
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
override