title: How to animate pacman mouth opening and closing in pygame?
body: <p>I want to draw a pacman which can open and close its mouth using python pygame.I'm unable to find proper documentation for that.</p>
  
  <p>I tried this code to draw an arc and a circle back and forth, it works properly but the resulting shape appears like its not filled with yellow color properly as it gets when I draw just a circle.</p>
  
  <pre><code>def draw(self, screen, count):
      if count &gt;0 and count &lt;= 50:
          pygame.draw.circle(screen, (255,255,0), (int(self.pos.x)+16, int(self.pos.y)+16), 16)
      else:
          if self.direction == Vector2D(1, 0):
              pygame.draw.arc(screen, (255, 255, 0), (int(self.pos.x), int(self.pos.y), 32, 32),
                  0.7853981634, 5.4977871438, 16)
          elif self.direction == Vector2D(-1, 0):
              pygame.draw.arc(screen, (255, 255, 0), (int(self.pos.x), int(self.pos.y), 32, 32),
                   -2.356194490,  2.356194490, 16)
          elif self.direction == Vector2D(0, -1):
              pygame.draw.arc(screen, (255, 255, 0), (int(self.pos.x), int(self.pos.y), 32, 32),
                   2.3561944902,  7.0685834706, 16)
          elif self.direction == Vector2D(0, 1):
              pygame.draw.arc(screen, (255, 255, 0), (int(self.pos.x), int(self.pos.y), 32, 32),
                   -0.7853981634,  3.926990817, 16)
  </code></pre>