clipPath property
Gets and sets if the text should be a part of the current clipping path.
//Create a new PDF document.
PdfDocument document = PdfDocument()
..pages.add().graphics.drawString(
'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 12),
bounds: Rect.fromLTWH(0, 0, 200, 100),
format: PdfStringFormat(
alignment: PdfTextAlignment.center,
lineAlignment: PdfVerticalAlignment.middle,
characterSpacing: 1)
//Set the clip path.
..clipPath = true);
//Save the document.
List<int> bytes = await document.save();
//Close the document.
document.dispose();
Implementation
bool clipPath = false;