In this chapter, we explore alternate ways and means of getting graphic-shaped data into Tkinter programs. Probably the most widespread vector-graphic format is the one designed to work on web pages. This is known as SVG, which is short-form for Scaled Vector Graphics. It is the official standard specification defined by the World Wide Web Consortium and has been around since 1999.
Our interest in SVG comes from the practical use it has for us in creating drawn shapes in Python with the Tkinter module.
Professional vector-drawing packages like Inkscape and some of the proprietary-drawing packages allow us, aided by some Python code, to acquire lists of coordinates that can be used directly in the
create_line(x0,y0 …)
functions of Tkinter.
There are growing libraries of copyright-free SVG pictures available on the web. With tools like Inkscape, we can dismantle existing images and use parts of them for our own graphic work and Python programs. One such site is www.openclipart.org...