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

Re: [pygame] blit image





On Wed, Dec 1, 2010 at 6:10 PM, Nathan BIAGINI <nathan.open@xxxxxxxxx> wrote:
Hi everyone,

i currently have a really weird problem. I want to blit a background image on my screen. It s a really simple operation and i ve done it so many times in this case, the image only appear when i move the screen with my mouse cursor... I definitively don't understand...
Here is the paste of the concerned source code :

http://bpaste.net/show/11826/

The image to print is loaded in the map instance of Map class. I get the whole path of the image from a file and then i load the image and blit it in the main. The image should be properly loaded because it appears when i move the window, maybe i ll paste you the concerned part of my class :

http://bpaste.net/show/11827/

i use those two print call to check if the image do no take a while a be loaded but it s not the case.

the line
pygame.display.update(map.map_sprites_group.draw(screen))
can be the problem ?

pygame.display.update(arg) ,
where arg a rect or a list of rects will only refresh the rects area;
so, is map.map_sprites_group.draw returning the expected rects ?

--
claudio