[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Bliting clip semantics



I found that for a large number (100+) of small sprites, blitting everything and letting the blit function figure out if things are onscreen is much faster than coding up checks in python, especially if the checks go down to the pixel level for sprites partially offscreen.

-Zack


On Feb 17, 2009, at 10:49 PM, Hugo Arts wrote:

you can blit something that is not on the screen or even half on the
screen without problems. It will work as expected

On Tue, Feb 17, 2009 at 8:55 AM, Daniel Mateos <daniel@xxxxxxxxx> wrote:
Hey All,

I was just wondering if i can count on Surface.blit dealing with stuff i pass it that has co-ords greater than its drawable area like say i pass
a rect of [200, 195, 10, 10] to a surface of size [200, 200].

I ask because i notice it is working right now as expected with a
function i use that only roughly checks if something is on the screen or
not before it is blited and im not sure if i should bother to make it
more accurate.

Daniel