[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] small change to Rect objects



I noticed the Rect objects were doing something i didn't expect.
when setting the width/height/size members, the rect was moving 
the top and left edges to make the change. like i mentioned, this
caught me by surprise and the more i thought about it, the less i
like it. i've just changed this in CVS, and now changing these
size elements will result in the left/bottom edges being moved.

pygame tip of the day: (heh)
you can also change the size of your Rect around the center
point. this is done with the Rect.inflate() function. remember,
like nearly all Rect functions, this will return a new Rect with
the changes, it does not effect the Rect it is called with.
you can pass negative numbers to inflate to shrink the Rect.




____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org