groove-x/pura

background() clear may be incorrect

belm0 opened this issue · 0 comments

belm0 commented

Depending on browser zoom level, the fillRect() for clearing the background may either be too large or too small (only the latter is noticeable, when using zoom less than 100%).

Due to devicePixelRatio scaling, using the canvas size directly is not correct. The code below should use self.width / self.height.

f"ctx.fillRect(0, 0, canvas.width, canvas.height);"

f"ctx.fillRect(0, 0, canvas.width, canvas.height);"