Update canvas.py

Update