Design ideas about iterators
boud at valdyas.org
Wed Mar 3 11:57:52 CET 2004
On Wednesday 03 March 2004 01:49, Cyrille Berger wrote:
> I see that composite.h could be transform using templates like that :
composite.h is deliberately ugly; I did it that way to make sure we wouldn't
let it remain so. I'm working on putting each composite op in its own class
-- see capability_mediator/*. Those classes should perhaps become quantums.
Remains the problem that some composite ops are valid only for some colour
> And we still need "enum enumImgType", even with template. Even if it is
> just to say the user : "it's a CMYB image".
Working on that -- it's not finished at all, but I'll checkin so you can see
what I'm working on.
> 2) I just sea an interesting idea for iterators in GEGL's documentation, we
> should do an iterator that return an other iterator which will contain a
> line. I don't think I am clear, we may have an iterator called iteratorLine
> which return an iteratorPixel.
> We may use them this way :
> for( iteratorLine iL = image->getIterator() ; iL != iL.end(); iL++)
> // go through lines
> for( iteratorPixel iP = *iL; iP != iP.end(); iP++)
> *iP = 0; // Clear the pixel
Looks cool, but don't forget that it also needs to work on a rect within a
Boudewijn Rempt | http://www.valdyas.org/fading/index.cgi
More information about the kimageshop