[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] having problem swith RenderUpdate
- To: Pygame Mailing List <pygame-users@xxxxxxxx>
- Subject: [pygame] having problem swith RenderUpdate
- From: KKarasu <catsareninja@xxxxxxxxx>
- Date: Mon, 15 Sep 2008 01:34:18 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sun, 14 Sep 2008 20:38:11 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=PmGe62qS+nSgrB5RESxOYe2kw0zJtZIPncCpeC1zkA4=; b=emVzz3ASKgDmSm9NLG6SBYfKrM9vUcK+Il5/uFXBulZkTbzi9QIcS91NB+b6sXkTp0 sb1IIuTuuIiYWbsfuZFyhiwvh/U2uL0RM2R70GvpXn4dNe8PUW17Ttvkhl0i+qvmgLMv d3f3y7J1CWd+rgcfvDi2szuK57116BtOBgkQA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=iL3vaEn189vfvcB9pM565DyzrW2mia4Mhg6ahE1+/NzoNV2/AhslLYyP1EjJLQu0Il laxKtJygr19o/hG9MGWfv+lzJcKmnj1e/aSczf1vE3LHIUFRmFWHe2Lo5ArAqJdhwuid OutOgtjmJ9L4jT2UhFz/npRUgI7VeSY8HSdJ8=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Thunderbird 2.0.0.16 (Windows/20080708)
Hi there!
After reading a couple of tutorials i just don't get how to clear just
the area the sprite changed.
exemple: i have an arrow, i blit it on the screen with a group.draw, and
i dont know how to just update the area that changed by this method. i
could blit again the entire screen, but i just want that spot, that way
i dont have to blother bliting a hole lot of other stuff.
# this is just the method part the rest is uninportant
def start(self):
self.rect=(self.image.get_rect()).move(self.posicao[0],self.posicao[1])
# this moves the object by messing with the rect
a=R_up.draw(screen) #this draws the group sprites (R_up=
thats RenderUpdate group)
#iundestand that returns the changed areas so it says in the docs i
should pass it to pygame.display.update
#so thats what i do
pygame.display.update(a)
so it doesnt work.
can anyone explainme how to do this?
<http://www.pygame.org/docs/ref/display.html#pygame.display.update>