[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] strange rect behavior...



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"