Skip to content Skip to sidebar Skip to footer

Resetting Image Along Canvas In Tkinter

I have used the code from this answer to draw and save images. In addition for my specific case, I needed a reset action/button, which would reset the canvas, so that a user can dr

Solution 1:

To reset the PIL image, you can just draw a white rectangle the size of the image:

def clear():
    draw.rectangle((0, 0, width, height), width=0, fill='white')
    cv.delete('all')
    draw_sticks()

Post a Comment for "Resetting Image Along Canvas In Tkinter"