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

Re: [pygame] Announcing Pygris




Hello...

I'm using Draw.Line() and trying to manage my dirty rects properly.
Line() in sopposed to return the "bouding rectangle of the effected area."
However, it's not doing what I expect:

An example line (x1, y1, x2, y2) is:

    [316.9968184989844, 238.00478049529437] [323.00477415393209,
242.99521823643315]

The return value from line is:

    <rect(0, 0, 324, 243)>

It looks like Line is drawing (x,y,x,y) as documented but the line rect code
is not treating it as such.
I would expect something (ignoring the particular float->int issues) like:

    <rect(317, 238, 6, 5>

E.g., returning (top, left, width, height).
This way I can keep a union as I draw and add it to my dirty rects for
Update().

Am I misunderstanding something?

Also, it would be nice if Rect operations (such as union) were in-place
(destructive) operations rather than creating new objs -- it's easy enough
to copy them, but in this case (keeping a running Union) it would be more
efficient.

thanks,
mike


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

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