[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Why doesn't this work?



I have another pygame2 problem. This code doesn't give me any errors, but it doesn't give me the circle I asked for, either:


    red = pygame2.Color (255, 0, 0)
    black = pygame2.Color (0, 0, 0)
    shape_size = (250, 250)
   
    video.init()
   
    screen = video.set_mode(500,500)
    screen.fill(red)
   
    circle_surface = video.Surface(shape_size)
    circle_surface.fill(red)
    gfx.filled_circle(circle_surface, (20,20), 40, black)
    circle_surface.flip()
   
    screen.blit(circle_surface, (25, 25))
    screen.flip()

Is the problem with my code or with my installation?
 
--
Evan Kroske
http://welcome2obscurity.blogspot.com/
The code, comments, and challenges of a novice
software developer desperate for attention.