SelectionIterators

Boudewijn Rempt boud at valdyas.org
Tue Jul 6 20:23:44 CEST 2004


Currently, the iterators in KisPaintDevice tagged with 'selection' return
a region within the image, instead of selected pixels -- when we do the 
iterator rewrite, I suggest the following naming scheme:

...Iterator -- iterate over the whole layer
...RegionIterator -- iterate over a region within the paint device

I first thought we might give a flag to the iterator constructor to determine 
whether it should return selected pixels, but perhaps it is better to have 
separate iterators for that purpose, as suggested by the current naming in 
KisPaintDevice:

...SelectionIterator
...SelectionRegionIterator

I like 'region' better than 'rect' for this purpose, though I don't know 
exactly why...

Let's also keep the possibility of parallel processing in mind for some later 
date.

-- 
Boudewijn Rempt | http://www.valdyas.org/fading/index.cgi


More information about the kimageshop mailing list