On Thu, 14 Jul 2011 19:05 +0200, "DR0ID" <[email protected]> wrote:
An old experiment of mine, it might give you a clue how you can do it (actually it replaces the pygame Surface object with the SurfaceObject class): [1]https://python-pyknic.googlecode.com/svn/branches/pyknic-2.0/e xperimental/surfaceobject.py Right, you appear to be doing the much the same thing, using super() to create the surface object. What I want to know is, how can you get it to act like that if you already have a surface. So, instead of passing in the size: s = SurfaceObject((400,300)) You would pass in an existing pygame.Surface object. s = pygame.Surface((400,300)) so = SurfaceObject(s) 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. References 1. https://python-pyknic.googlecode.com/svn/branches/pyknic-2.0/experimental/surfaceobject.py
