paintBackground method

  1. @override
void paintBackground(
  1. Context context
)
override

Implementation

@override
void paintBackground(Context context) {
  super.paint(context);

  if (drawSurface) {
    _paintShape(context);
    if (surfaceOpacity != 1) {
      context.canvas
        ..saveContext()
        ..setGraphicState(
          PdfGraphicState(opacity: surfaceOpacity),
        );
    }

    context.canvas
      ..setFillColor(color)
      ..fillPath();

    if (surfaceOpacity != 1) {
      context.canvas.restoreContext();
    }
  }
}