Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Meme Generator
- from guizero import App, TextBox, Drawing, Combo, Slider
- app =App("meme", height= 750)
- def draw_meme():
- meme.clear()
- meme.image(0,0, "woodpecker.png")
- meme.text(20,20, top_text.value, color=colour.value, size = size_of_font.value, font = font_name.value)
- meme.text(20,320, bottom_text.value, color=colour.value, size = size_of_font.value, font = font_name.value)
- top_text = TextBox(app, "Top Text gerald", command = draw_meme )
- bottom_text = TextBox(app, "bottom_text heelo", command = draw_meme)
- colour = Combo(app, options =[ "black", "white", "red", "green","blue", "orange","yellow" ], command = draw_meme)
- font_name = Combo(app, options = ["times new roman","Segoe Print","courier","impact","arial","courier"], command = draw_meme)
- size_of_font = Slider(app, start=20, end = 40, command = draw_meme)
- meme = Drawing(app, width="fill", height= "fill" )
- draw_meme()
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement