-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcanvas.py
More file actions
22 lines (18 loc) · 729 Bytes
/
canvas.py
File metadata and controls
22 lines (18 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from tkinter import *
# Creating Window
window = Tk()
# Styling Window
window.title("Canvas Program Tkinter")
window.geometry("600x600")
window.config(bg="black")
# Creating Canvas
canvas = Canvas(window, height=500, width=500)
# canvas.create_line(0,0,500,500, fill="green", width=200)
# canvas.create_line(0,500,500,0, fill="green", width=200)
# canvas.create_oval(120, 120, 380, 380, fill="red")
# canvas.create_rectangle(200, 0, 400, 300, fill="blue")
canvas.create_oval(200, 200, 300, 300, fill="green", outline="black", width=3)
canvas.create_arc(480, 480, 20, 20, style=PIESLICE, extent=300, start=30, fill="yellow", outline="black", width="5")
canvas.pack()
# Displaying Window
window.mainloop()