Which of the following code snippets is best way to clear the canvas for redrawing?
Answer
Correct Answer: var canvas = document.getElementById('canvasId'); var context = canvas.getContext('2d'); ctx.save(); ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.restore();
Explanation:
Note: This Question is unanswered, help us to find answer for this one