Skip to main content
fixed formatting
Source Link
Moritz Ringler
  • 16.4k
  • 10
  • 29
  • 45

If you're getting a blacked out screen using this method

ctx.beginPath()
ctx.fillStyle = "rgba(0, 0, 0, 255)"
ctx.fillRect(0, 0, canvas.width, canvas.height)    
ctx.stroke(); then switch all the 0's in rgba to 255


enter code here`enter code here`
`ctx

then switch all the 0's in rgba to 255

ctx.beginPath();
ctx.fillStyle = "rgba(255, 255, 255, 255)";
ctx.fillRect(0, 0, canvas.width, canvas.height);    
ctx.stroke();`enter code here;

If you're getting a blacked out screen using this method

ctx.beginPath()
ctx.fillStyle = "rgba(0, 0, 0, 255)"
ctx.fillRect(0, 0, canvas.width, canvas.height)    
ctx.stroke(); then switch all the 0's in rgba to 255


enter code here`enter code here`
`ctx.beginPath();
ctx.fillStyle = "rgba(255, 255, 255, 255)";
ctx.fillRect(0, 0, canvas.width, canvas.height);    
ctx.stroke();`enter code here

If you're getting a blacked out screen using this method

ctx.beginPath()
ctx.fillStyle = "rgba(0, 0, 0, 255)"
ctx.fillRect(0, 0, canvas.width, canvas.height)    
ctx.stroke();

then switch all the 0's in rgba to 255

ctx.beginPath();
ctx.fillStyle = "rgba(255, 255, 255, 255)";
ctx.fillRect(0, 0, canvas.width, canvas.height);    
ctx.stroke();
Source Link

If you're getting a blacked out screen using this method

ctx.beginPath()
ctx.fillStyle = "rgba(0, 0, 0, 255)"
ctx.fillRect(0, 0, canvas.width, canvas.height)    
ctx.stroke(); then switch all the 0's in rgba to 255


enter code here`enter code here`
`ctx.beginPath();
ctx.fillStyle = "rgba(255, 255, 255, 255)";
ctx.fillRect(0, 0, canvas.width, canvas.height);    
ctx.stroke();`enter code here