[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] strange rect behavior...
On Sun, 2005-10-09 at 12:13 +0200, Lionel barret De Nazaris wrote:
> If I write :
> rect = pygame.Rect([0,0,0,0])
> rect.bottom = 100
> print rect.height
>
> I get :
> 0
This is "correct" because setting the Rect attributes moves the rectangles.
You can set the "width", "height", and "size" attributes to change the Rect size,
in these cases the top,left edge will not be moved.
It may be more clear on a Rect with dimensions.
>>> a = pygame.Rect(0, 0, 10, 10)
>>> a.bottom = 100
>>> print a.top
90