##########################################################################################
# Create a Tkinter screen with a canvas
# including: square, rectangle, circle, triangle, arc, line and text
##########################################################################################
from tkinter import *			            #import entire tkinter framework

#### Create a window with a Canvas and a Frame ###########################################

win = Tk( )					                    #call Tk( ) constructor to create a root window
win.title("Tkinter Window with Canvas")	        #set a window title

### The Canvas ##############################################################

canvas = Canvas(win, width=400,height=400)

canvas.create_rectangle(10,10,100,100,fill='red')                       #left/top point, right/bottom point     
canvas.create_rectangle(110,10,250,100,fill='blue')
canvas.create_oval(260,10,350,100,fill='orange')                        #left/top point, right/bottom point  
                                                                        #of virtual enclosing square     

canvas.create_line(10,10,150,150,50,150,10,10,width=2,fill='black')     #pairs of x,y points

canvas.create_arc(50,170,300,320,start=45,extent=90,fill='green')       #left/top point, right/bottom point           
canvas.create_arc(50,170,300,320,start=135,extent=90,fill='brown')      #of virtual enclosing square    
canvas.create_arc(50,170,300,320,start=225,extent=90,fill='white')      #starting angle, extend degrees    
canvas.create_arc(50,170,300,320,start=315,extent=90,fill='black')    

canvas.create_polygon(390, 180, 330, 110, 260,180, fill="gray", outline="red")  #3point polygon = triangle

canvas.create_text(150,350,text="Its a Start") 

canvas.pack()                                   #make the canvas visible
win.mainloop()                                  #make the window visible