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

Re: [pygame] Problems with Surface.fill clipping routines?



> surf.fill ((255, 0, 0),

>              ((-70.262315113583014, 160),

>               (370.34462128157986, 240)))


woohoo, this one's not a bug! :]
hi arturo, this is actually working as expected (well, at least how i 
expect). the thing that is probably throwing you off is that the second 
pair of values you are passing the filled rectangle represent 
width/height of the area, not the position of the right/bottom edge.

so after clipping, your fill function is filling from topleft corner 
0,160 to bottom right corner 300,240. not quite the fill width of the 
display. btw, you get this problem doing the fills straight to the 
screen surface, no need to use the intermediate one.

anyways, i'd be suprised if there was a bug in the filling routines. 
these make straight calls to the SDL filling functions, which i'm sure 
are working. as for your "extensive" bugfinding in the draw module, i'm 
not so suprised. this weekend i plan to go through all your findings and 
check for any fixes that need to be made. i'll give a full report on all 
your submissions then, first i need some time to dig.


also, a couple "just so you know" nuggets of information :]

* all new surfaces are filled with zero
* pygame.time.delay(100) is similar to time.sleep(.1)
* those rectangle arguments can also just take a 4-item tuple
   (so no need to split it into two tuples of two values)

actually, the pygame.time.delay() calls should be more

accurate on most platforms.



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