Search code examples
pythontkinterpacman

Drawing Pacman's Face in Tkinter


So I'm coding Pacman in Python just for fun and I want to create pacman's open face (when he is eating food) using Tkinter graphics. How exactly do I draw an open face? I was thinking about using canvas.create_arc to create the open mouth but it doesn't work properly :(

Any help? Thanks!


Solution

  • You are correct that you would use the create_arc method. Set the start to 45 and the extent to 270 and it will look like pacman is facing to the right with his mouth open.

    Since you are just learning I'll not post the exact code so you'll have a chance to figure it out on your own.