I'm having this problem with the Surface.set_clip() method that appears to
be a bug:

   import pygame
   print pygame.__version__
   s = pygame.display.set_mode((800, 600))
   r = pygame.Rect(10, 10, 10, 10)
   s.set_clip(r)
   print s.get_clip()
   r.move_ip(10, 0)
   print s.get_clip()
   s.set_clip(None)
   print s.get_clip()

This yields the following output:

   1.7.1release
   <rect(10, 10, 10, 10)>
   <rect(10, 10, 10, 10)>
   <rect(25708, 0, 0, 600)>

After this, the clip region of the display surface is garbled and operations
on the surface fail.  Running the script again yields a different garbled
value.

I tried modifying the line with set_clip() with:

   s.set_clip(pygame.Rect(r))

but this did not solve the problem.

Is this really a bug, or am I doing something wrong?  Also, my apologies if
this has been discussed before.

Thanks,
Diego

Reply via email to