-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfive_meme.py
31 lines (18 loc) · 983 Bytes
/
five_meme.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Create your own MEME's LOL
from guizero import App, TextBox, Drawing, Combo, Slider
def draw_meme():
meme.clear()
meme.image(x = 0, y = 0, image = "cat2.png")
meme.text(x = 20, y = 20, text = top_text.value, color = color.value, size = size.value, font = font.value)
meme.text(x = 20, y = 320, text = buttom_text.value, color = "red", size = size.value, font = font.value)
app = App(title = "MEME")
top_text = TextBox(app, text = "Top Text", command = draw_meme)
buttom_text = TextBox(app, text = "Buttom Text", command = draw_meme)
color = Combo(app,
options = ["red", "black", "blue", "green", "orange", "purple"],
command = draw_meme, selected = "blue")
font = Combo(app, options = ["times new roman", "verdana", "courier", "impact"],
command = draw_meme, selected = "courier")
size = Slider(app, start = 20, end = 50, command = draw_meme)
meme = Drawing(app, width = "fill", height = "fill")
app.display()