Design of KisCurveIterator

Cyrille Berger cberger at cberger.net
Sun May 28 11:53:48 CEST 2006


> (Kind of PS: I suddenly realize you perhaps might need it to nicely
> determine the next value of t to use.)

exactly :) but I don't know yet.

> > KisCurveFunction should be accessible by the at least the
> > KisTiledCurveIterator, and plugins. That's why I was thinking to put in
>
> I guess you meant to say 'put in sdk/'?
yes, it was late for me too :]


> > The big question without answer yet is wheter the subsamplinging is
> > handled by the iterator or by the user. For reading, it's pretty easy how
> > to do it. But I am little bit skeptical for writing, in the use I have in
> > mind I don't need writing, so maybe this iterator should be read only ?
>
> Why not have bool useSubsampling(); void setUseSubsampling(bool); for the
> reading functions? I agree it's not really intuitive how to handle the
> write part, so leaving this out should be no problem.
I had rather have :
/// return an array to use with subsampling function, it's up to you to delete 
it
createSusbsampleArray();
rawDataSubsampled(char* dst );
oldRawDataSubsampled(char* dst);

/// Access to the top left pixel
rawDataTopLeft()
oldRawDataTopLeft()

/// Weight of the top left pixel in the subsample
hweightTopLeft()
vweightTopLeft()

or maybe just weightTopLeft()

etc...

> > Bart asked me on irc why not use the allready available iterators ? Good
> > question, but:
>
> Reading the next part didn't really change my opinion, though ;-)
>
> (...)

Well maybe adding nextAdjacentColumn/Row previousAdjacentColumn/Row to 
H/VLineIterator could do it, but I am still skeptical for performance. 
Creating iterators can be very expensive, and changing tile too, even if the 
tile is allready in memory.

-- 
--- Cyrille Berger ---


More information about the kimageshop mailing list