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

Re: [pygame] Surface objects



sam.hacking@xxxxxxxx wrote:

What I want to know is, how can you get it to act like that if you already have a surface.

I don't think it's possible to do this in such a way that
the resulting object will work as a Surface in all contexts.

One way I've just thought of, maybe if I create a new surface (through __init__) the same size as the surface passed in, then just blit the passed in surface onto the newly created surface.

That's probably about the best you can do.

However, if it were me I'd be thinking about whether I
can redesign things so that I don't need a specialised
version of an existing surface. Perhaps if you tell us
more about why you want to do this, we can suggest
alternatives.

--
Greg