Showing posts with label drawin polygons. Show all posts
Showing posts with label drawin polygons. Show all posts

Tuesday, 26 July 2016

Canvas - Drawing Polygons

img_a_01

The first code is a simple example:

import Tkinter
root    =  Tkinter.Tk()
ch, cw  =  170, 170
c1 = Tkinter.Canvas(root, height = ch, width = cw, bg = "black")
ps = [   60, 130,  40, 120,  40,  80,  70,  40,
        100,  40, 130,  80, 130, 120, 110, 130]