[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] strange rect behavior...
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] strange rect behavior...
- From: andrew baker <failrate@xxxxxxxxx>
- Date: Sun, 9 Oct 2005 11:45:05 -0700
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Sun, 09 Oct 2005 14:45:18 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=gtPm91p0MeEroE9yoS0Sh5Hd/tlilq/Dgc4SHjr60lbFRPPe5/tI1qofMpMbIvI9jgcmOVNN8/8MjfwwNhdJu42YXpGEkL4KBSS1GHUp3bfxDqbHKftSAGvfktowKj+w+psBrm2Y84GOb+v1vikL/IHqYLiQZe3alMh3UlimJ84=
- In-reply-to: <4348ED55.4050607@free.fr>
- References: <4348ED55.4050607@free.fr>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
I believe Rects have their handle on the top-left. That's fairly
common, so, yes... bottom should be top + height. Remember,
you'll generally increment to go down the y onscreen and decrement to
go up. This seems backwards compared to Cartesian graphs, but you
should remember that it has more to do with the top-left of your screen
being the origin for all mapping. The top-left is 0,0.
On 10/9/05, Lionel barret De Nazaris <lionel.bdn@xxxxxxx
> wrote:hello all, (possibly newbie question)
If I write :
rect = pygame.Rect
([0,0,0,0])
rect.bottom = 100
print rect.height
I get :
0
I thought that : Bottom = Top + Height..
Is This correct ? and Why ?
Looks very strange from the outside.
Thanks,
Lionel.
--
Andrew Ulysses Baker
"failrate"