Cyrille Berger cyb at
Mon Jul 26 14:37:43 CEST 2004

> * Iterators should take a paint device, not a tile manager in their
> constructor. I want tile manager to be more private to the paint device,
> with iterator being a friend or something to the paint device, so it can
> get at it. I'd just as soon never have anyone building an image
> manipulation algorithm extract the tile manager.
That's exactly why I would preffer to give iterators a tile manager, iterators 
are created inside a paint device. If you change data() from public to 
private, no one outside KisPaintDevice can acces it, except class that are 
constructed inside KisPaintDevice :

KisPaintDevice {

 KisTileMgrSP data() { return m_data; };
 KisIterator iterator() { return KisIterator( m_data ); };

 KisTileMgrSP m_data;


> * I'd like to have a richer set of iterators: over rects, over tiles (for
> speed), and so on. Lines/pixel are okay.
anyway, I don't see any differences between iterators over rects and over 
I think we should have two "basic" iterators :
- rects (walking on the image tile after tile)
- line/pixel (walking on the image line after line)

And if we want other iterators, I think we can build them on top of one of the 
"basic" iterators. It would reduce the maintenance cost when we change 
something to the TileMgr or the PaintDevice.

> * Oh, and I'd like a hint on what's going wrong in But
> that probably has to do with the return type.
there was two times ++pixelIt.

--- Cyrille Berger ---

More information about the kimageshop mailing list