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

Re: [pygame] PixelArray question



On Thu, Aug 23, 2007 at 08:10:18AM +0200, Marcus von Appen wrote:
> On, Thu Aug 23, 2007, Lenard Lindstrom wrote:
> 
> > I may have missed something, but why is a separate PixelArray class 
> > necessary. Couldn't the array methods and buffer interface be added to 
> > Surface?
> 
> Sure. And anything else, what might be added to the PixelArray later on,
> as well. As a result we would have a glorious
> can-do-anything-implements-all-python-interfaces class called Surface :-).
> 
> Separate functionality should be separated in different
> classes. Otherwise you just have a messy structure, which is hard to
> maintain and enhance. You can also run into function conflicts, where
> the same python interface could/should/must have a different behaviour.
> 
> It's better to have several different classes with clear purposes than
> such a mess.

What if PixelArray was a subclass of Surface?

---
James Paige