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

[pygame] Fill doesn't seem to work as expected.



This is pygame 1.8.1 on WinXP, DX9.

I'm trying to dim the entire window for a pause screen. It seems like the logical way to do this would be to

   # screen = pygame.display.set_mode( (800,600), 0 )   at start of program
   screen.get_surface().fill( (100,100,100), None, BLEND_MULT )

but this results in everything being turned hideously green/cyan (and not dimmer at all). It doesn't seem to matter whether I use BLEND_RGB_MULT, BLEND_RGBA_MULT, or even ADD/SUB instead of MULT, or specify the rect instead of None.

What does work is to do:
	dim = pygame.Surface( screen.get_size() ).convert()
	dim.fill( ( 100, 100, 100 ) )
	screen.blit( dim, (0,0), None, BLEND_MULT )
which does exactly what I'd expect.

Am I missing something on the .fill method? I can use the workaround, so this is just curiosity.

Ron