PdfLineCap enum Null safety
Specifies the line cap style to be used at the ends of the lines.
//Create a new PDF document. PdfDocument document = PdfDocument() ..pages.add().graphics.drawRectangle( pen: PdfPen(PdfColor(255, 0, 0), dashStyle: PdfDashStyle.custom, lineCap: PdfLineCap.round) ..dashPattern = [4, 2, 1, 3], bounds: Rect.fromLTWH(0, 0, 200, 100)); //Save the document. List<int> bytes = document.save(); //Close the document. document.dispose();
- flat → const PdfLineCap
The stroke is squared off at the endpoint of the path. There is no projection beyond the end of the path.
- round → const PdfLineCap
A semicircular arc with a diameter equal to the line width is drawn around the endpoint and filled in.
- square → const PdfLineCap
The stroke continues beyond the endpoint of the path for a distance equal to half the line width and is squared off.
→ const List<
A constant List of the values in this enum, in order of their declaration.