jupyter-widgets-contrib / ipycanvas

Interactive Canvas in Jupyter
https://ipycanvas.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
685 stars 62 forks source link

bug on canvas.clear() #330

Open bhomass opened 1 year ago

bhomass commented 1 year ago

if I use canvas.scale(0.125), and call canvas.clear(), it only clears top left hand corner, which is 1/8 the width and height of the canvas.

martinRenou commented 1 year ago

Thanks for reporting. Indeed, clear is implemented to do the equivalent of clear_rect(0, 0, canvas.width, canvas.height) which may not take the current scale into account.