[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pygame] Cirle's clipping bug?
Hi,
this piece of code crashes Pygame (release 1.2, WinNT). When you uncomment
marked line, crash no longer occurs. I guess, there is problem with
clipping. If you change width of circle to other value than 0 then
everything will be ok.
And one more tip - try to set radius of circle to a lower value than width
of the circle or event to a negative value. (Change xrange's first
parameter to 0, -1, ..) :-)
Ludek
-----------------------------------------------------------------------
import pygame, pygame.draw, pygame.time
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode((640, 480), SWSURFACE, 16)
center = screen.get_rect().center
# comment or uncomment following line
# screen.set_clip(0, 0, 639, 479)
for r in xrange(1, 480):
print screen.get_clip(), center, r
screen.lock()
screen.fill((0x00, 0x00, 0x00))
pygame.draw.circle(screen, (0xff, 0xff, 0xff), center, r, 0)
screen.unlock()
pygame.display.flip()
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org