[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] question on rect properties
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] question on rect properties
- From: "Alejandro J. Cura" <alecu@xxxxxxxxxxxxxx>
- Date: Mon, 9 Oct 2006 11:10:02 -0300
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Mon, 09 Oct 2006 10:10:16 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=oeGf81GAiKmLF3Y6DwAmR5icJjBuPq0S9sdBv4VnHdAtCv2A1ZtuXyjJrSYNUO1xiPzpZepoC18YpDiMc7elGt1sqj9RKV4ZgwU63MtO+CRV+ickL1om8oQTmkiU/NoKZjNnNaB3h46IexRDnn72LRuGf9HT8UtU1hOKwIWHcyU=
- In-reply-to: <452A1F98.2060506@gmail.com>
- References: <452A1F98.2060506@gmail.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
On 10/9/06, altern <altern2@xxxxxxxxx> wrote:
hi
if i change the width or height of a pygame rect, the center property
changes as well, doesnt it? This is because center is relative to the
top, left. Am i right on this?
When you change the width, height or size properties of a pygame rect,
the top and left are not changed, so yes: the center is adjusted.
If you want to change the size of a rect, but keep the same center you
should use the inflate of inflate_ip methods.
Cheers,
--
alecu