skewTransform method

void skewTransform(
  1. double angleX,
  2. double angleY
)

Skews the coordinate system axes.

//Create a PDF Document.
PdfDocument document = PdfDocument();
document.pages.add().graphics
  ..save()
  //Set skew transform
  ..skewTransform(10, 10)
  ..drawString('Hello world!', PdfStandardFont(PdfFontFamily.helvetica, 12),
      pen: PdfPens.red)
  ..restore();
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();

Implementation

void skewTransform(double angleX, double angleY) {
  final PdfTransformationMatrix matrix = PdfTransformationMatrix();
  _getSkewTransform(angleX, angleY, matrix);
  _helper.streamWriter!.modifyCurrentMatrix(matrix);
  matrix.multiply(matrix);
}