[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] Problems with Surface.fill clipping routines?




Run this code:

The red area is supposed to be all the lower half of the screen.

#!/usr/bin/env python

import pygame
from time import *

SCR_GEOM = (SCR_WIDTH, SCR_HEIGHT) = (320, 240)

pygame.init ()
screen = pygame.display.set_mode (SCR_GEOM, pygame.DOUBLEBUF)
surf = pygame.Surface (SCR_GEOM).convert ()
surf.fill ((0, 0, 0))
surf.fill ((255, 0, 0), ((-70.262315113583014, 160), (370.34462128157986, 240)))
screen.blit (surf, (0, 0))
pygame.display.flip ()
while pygame.event.poll ().type != pygame.QUIT:
    sleep (.1)
    pass


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org