Adding some more features
Next in line, let's add a few more features to our drawing program. In particular, we will add the ability to delete objects from the canvas, add a paint bucket, the ability to move items up and down the stack, and the ability to drag items on the canvas, as shown in the following screenshot:
Step 1 – extending our methods tuple
As a first thing, let us extend our
all_toolbar_functions method to make provisions for the new methods that we will define here, as follows (see code 6.05.py):
all_toolbar_functions = ('draw_line', 'draw_rectangle', 'draw_oval', 'draw_brush', 'delete_object', 'fill_object', 'move_to_top', ...