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

Re: [pygame] road to 1.6



Pete Shinners wrote on 2003-06-08:

> Beni Cherniavsky wrote:
> > I'd like to see some automatic dirty-rectangle tracking or anything
> > else that allows to know what areas have changed in a surface.  See
> > the thread
>
> i think your best bet is going to be keeping track of this externally.
> you can subclass the 'blit' and 'fill' methods from Surface. as for any
> of the other drawing functions, i'd say you'll just need an external
> function people must call to 'update' areas of your destination manually.
>
> since they would probably want to do keep track of the 'dirty' areas
> anyways if it was a software display surface, it doesn't seem too
> painful to ask for the same information for your surface also.
>
>      my_update(surf, list_of_rects)
>
Yes, that's what I was about to do.  The only drawback is that
existing code, e.g. from the PCR, will have to be modified to support
this.  If there was a hook in all pygame's functions, any Python code
would support this automatically.  It would be as transparent as the
automatic surface locking.

-- 
Beni Cherniavsky <cben@users.sf.net>