What is canvas ?
- Canvas is a geometry material thing like line, circle, rectangle etc.
- To draw a canvas like structure, many programming language like c, c++, python, java etc supports this.
-Here (x1,y1) and (x2,y2) are different ends of the rectangle.
from tkinter import *
#create a window screen
#hold the screen
-In this program, we firslty create a canvas window inside the window screen by using canvas=Canvas(win).
-Then we create a three rectangles with differnt orientation with different colours and 'fill' are used to fill the colour inside the rectangle.