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

Re: [pygame] Rect object



> it'd be nice if the Rect.union method could take a sequence of rects..

hey bob, is that all it will take to make you happy?
<...swish swish of the magic wand...>

i now give you (in keeping with the current Rect name scheme)
Rect.unionall(). i'll let the docs speak for themselves...

>>> print Rect(1,2,3,4).unionall.__doc__
Rect.unionall(sequence_of_rectstyles) -> Rect
rectangle covering all inputs

Returns a new rectangle that completely covers all the
given inputs. There may be area inside the new
rectangle that is not covered by the inputs.

also new to the Rect objects are four new 'virtual members'
midleft, midright, midtop, midbottom. these represend the 
midpoint on each edge of the rectangle. use and abuse.

this is in cvs now, so grab the latest code if you want to
use this. otherwise, wait for pygame-1.1 (couple of weeks is my guess)


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