Advertisement
timber101

GUIZERO - Meme Generator

Jul 18th, 2021
2,120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. # Meme Generator
  2.  
  3. from guizero import App, TextBox, Drawing, Combo, Slider
  4.  
  5. app =App("meme", height= 750)
  6.  
  7. def draw_meme():
  8.     meme.clear()
  9.     meme.image(0,0, "woodpecker.png")
  10.     meme.text(20,20, top_text.value, color=colour.value, size = size_of_font.value, font = font_name.value)
  11.     meme.text(20,320, bottom_text.value, color=colour.value, size = size_of_font.value, font = font_name.value)
  12.    
  13. top_text = TextBox(app, "Top Text gerald", command = draw_meme )
  14. bottom_text = TextBox(app, "bottom_text heelo", command = draw_meme)
  15. colour = Combo(app, options =[ "black", "white", "red", "green","blue", "orange","yellow" ], command = draw_meme)
  16. font_name = Combo(app, options = ["times new roman","Segoe Print","courier","impact","arial","courier"], command = draw_meme)
  17.  
  18. size_of_font = Slider(app, start=20, end = 40, command = draw_meme)
  19.  
  20.  
  21.  
  22. meme = Drawing(app, width="fill", height= "fill" )
  23.  
  24.  
  25. draw_meme()
  26.  
  27. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement