Substrate implementation proposal

Bart Coppens kde at bartcoppens.be
Tue Apr 4 14:25:24 CEST 2006


On Tuesday 04 April 2006 14:12, Boudewijn Rempt wrote:
> > getPixel()
> > {
> >   switch(datatype)
> >      case tiled
> >         tilemanager->getpixel(x,y)
> >      case pattern
> >         pattern->getPixel(x%size, y%size)
> >     case function
> >        function->getPixel(x,y)
> > }
Good idea!

> Hmm... That would be possible, and we could add a writePixel as well.
Cool idea too! And it wouldn't be so hard to get it working even with function 
and pattern, I think.

One small thing, with me being the one who likes to break down good ideas ;-): 
Don't forget that I'm still planning to change the getPixel basics a bit in 
the tilemanager, because of the swapping and mmapping. That might need to see 
a few small changes to your plan (like let getPixel not return a pointer, but 
let it also write to a user-preallocated piece of memory). Nothing serious, 
though.


More information about the kimageshop mailing list