getGraphics method

PdfGraphics getGraphics()

This returns a PdfGraphics object, which can then be used to render on to this page. If a previous PdfGraphics object was used, this object is appended to the page, and will be drawn over the top of any previous objects.

Implementation

PdfGraphics getGraphics() {
  final stream = PdfObjectStream(pdfDocument);
  final g = PdfGraphics(this, stream.buf);
  _contentGraphics[stream] = g;
  contents.add(stream);
  return g;
}