clear method

void clear({
  1. PStyle? style,
})

Clears the canvas.

  • Applies style if provided.

Implementation

void clear({PStyle? style}) {
  saveState();

  transform = PcanvasTransform.none;
  clearRect(0, 0, width, height, style: style);

  restoreState();
}