getGraphics method

PdfGraphics getGraphics()

Returns a PdfGraphics object for drawing on this page.

Each call appends a new content stream rendered over previous streams.

Implementation

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