Canvas - Patch67/Graphics GitHub Wiki
Canvas is a tkinter widget that is a sub class of frame. It adds graphics capabilities to frame. Graphics elements are added to Canvas by means of create method. id = canvas.create_line(x0,y0,x1,y1)
The id returned is simply an integer handle (not an object reference). That handle can then be used to modify the graphics elements, i.e. change colour, line style, delete it, etc.
Canvas keeps its graphics objects until they are deleted. This is an advantage as screen redraws and partial redraws are handles automatically. However this is problematic in that it duplicates the data in Model which doesn't fit well into an MVC architecture.
Canvas has routines to create, modify and delete graphics objects by reference to its id or a tag. It also has the ability to pick graphics objects, to highlight them and to copy them to the copy buffer. It also has the ability to output its contents to Postscript.