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

[pygame] Surface objects



Hey guys,
 
I have a class which inherits from pygame.Surface. If the class gets created with a tuple, I create a new surface by calling pygame.Surface.__init__, so my class will work as a pygame.Surface object.
     I also need this class to be created with existing pygame.Surface objects. So, if I pass in a pygame.Surface object to my class, how can I get my class to be treated as a pygame.Surface object? Do pygame.Surface objects store their data in an accessible variable such as _image, in which case I presume I could copy the Surface._image to self._image to get the desired effect?
 
Thanks,
Sam Bull