html5-canvasClearing the screen

Syntax

  • void clearRect(x, y, width, height)
  • ImageData createImageData(width, height)

Remarks

None of these methods will produce transparent pixels if the context was created with the alpha: false parameter.