[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Problem with get_rect()
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Problem with get_rect()
- From: Sami Hangaslammi <sami.hangaslammi@xxxxxxxxx>
- Date: Tue, 19 Jul 2005 23:44:14 +0300
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Tue, 19 Jul 2005 16:44:27 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JlNmRM6Ijax9yJkGqVm1cXutXZ8Hh1aovtLDXDUUtskmIJFhvF5dn6R/CKHJUSgo6sqTOa9C9Ot9yH6GcyDkjaiqdTsmzIE6VO/Ru9hJ5eshRUR1uNQI6aVdBrz9beSHY7Wr/kZu4v08YCo7ql4IfGa0idj8XYZpgDEkthnPMyQ=
- In-reply-to: <152eee450507191333401e625b@mail.gmail.com>
- References: <152eee450507191333401e625b@mail.gmail.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
On 7/19/05, Ari Cheslow <iamchillin@xxxxxxxxx> wrote:
> I've been working on a game of mine called Runtling and I've ran into
> a little problem with pygame.Surface.get_rect() It says in the pygame
> documentation that get_rect takes keyword arguments. However I've ran
> into error saying that it doesn't
Yep, seems like to documentation is out of sync with the 1.7 release.
Maybe the current CVS version has the keyword arguments? Anyway, you
only need two extra lines to do it without the keyword arguments, just
replace
return self.ani.image().get_rect(center=self.pos)
with
r = self.ani.image().get_rect()
r.center = self.pos
return r
--
Sami Hangaslammi