Commits

aholkner  committed 98d65b5

mixer endevent fix; circle radius fix

  • Participants
  • Parent commits 44ce7ae
  • Branches ctypes-soc

Comments (0)

Files changed (3)

 Pygame-ctypes 0.09
 ------------------
  - pygame.mixer.Channel.get/set_endevent fixed
+ - pygame.mixer endevent callback fixed
+ - pygame.draw.circle correct box for given radius
 
 Pygame-ctypes 0.08
 ------------------

File pygame/draw.py

     '''     
     # TODO optimise with circle symmetry
     return ellipse(surface, color, 
-                   (pos[0] - radius, pos[1] - radius, radius * 2, radius * 2), 
-                   width)
+                   (pos[0] - radius, pos[1] - radius, 
+                    radius * 2 - 1, radius * 2 - 1), 
+                    width)
 
 def ellipse(surface, color, rect, width=0):
     '''Draw a round shape inside a rectangle.

File pygame/mixer.py

         e = e.specialize()
         if isinstance(e, SDL_UserEvent):
             e.code = channel._endevent
-        SDL_PushEvent(e)
+        SDL_PushEvent(cast(pointer(e), POINTER(SDL_Event)))
     if channel._queue:
         channel._sound = channel._queue
         channel._queue = None