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

Re: [pygame] how to show my pic on screen ?



You have to had created the screen surface already by doing:

    pygame.init()
    screen = pygame.display.set_mode((640, 480))

what you have to do next is blit it to the screen surface.

screen.blit(pic, (0,0))

Then you need to update the screen, by doing:

    pygame.display.update()

I recommend either the docs on pygame.org or grab some sample source code and try to read it and play with it to undertsand what is happening....

Good luc,
Jesse
-----Original Message-----
From: black <quiteblack@yahoo.com>
To: pygame-users@seul.org
Date: Sat, 28 Sep 2002 02:41:52 -0700 (PDT)
Subject: [pygame] how to show my pic on screen ?


Hi,all~

I've already build up a surface but dunno how to display it. my code is below:

import pygame

pic1=pygame.image.load("C:\Documents and Settings\wd09\My Documents\My Pictures\dog.jpg")



thanx for any reply~



---------------------------------
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!


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