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

[pygame] Locking surfaces and cursors



On Mon, 18 Dec 2000, Pete J Shinners wrote:

>sounds like Surface.set_at should just be calling SDL_FillRect
>instead of trying to do its own homebrew pixel twiddling. the
>unfortunate
>side effect of this would be that set_at() requires unlocked surfaces
>and get_at() requires locked surfaces. hmmm?

Maybe get_at() could do an automatic lock/unlock when used? Then the user
would not have to worry about it. Or is this a too big performance hit if
it is called repeatedly?

Otherwise the first get_at() could lock the surface and store the info in
an internal flag for the surface. Functions/methods that require it to be
unlocked (such as blitting) could check this flag and internally unlock it
if needed.

Then, maybe not.

Is there somewhere some example on how the mouse cursor is set? I know the
functions, but not the format for the cursor data.

--------------------+--------------------------------------------------------
Jan 'Chakie' Ekholm |     Balrog New Media    http://www.balrog.fi/
   Linux Inside     | I'm the blue screen of death, nobody hears your screams

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