On 21 Aug 2006 at 12:21, Alex Holkner wrote: > Thanks, fixed in r937. > This must be getting annoying, but I have yet another bug. The following program should display a red square, but gives me a blue one instead. Apparently the red and blue color channels are switched.
import pygame from pygame.locals import * WSZ = 200 M = 10 def main(): screen_size = (WSZ, WSZ) pygame.init() screen = pygame.display.set_mode(screen_size) screen.fill(Color('white')) im = pygame.Surface((WSZ-2*M, WSZ-2*M)) im.fill(Color('red')) # Troublesome code begins here! image = pygame.Surface(screen_size, SRCALPHA, 32) image.fill((0, 0, 0, 0)) image.blit(im, (M, M)) # and ends here. screen.blit(image, (0, 0)) pygame.display.flip() while 1: for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN and event.key == K_ESCAPE: return if __name__ == '__main__': main() Lenard Lindstrom <[EMAIL PROTECTED]>