iterator offset problem

Casper Boemann cbr at boemann.dk
Thu Mar 17 23:16:02 CET 2005


On Thursday 17 March 2005 22:17, Bart Coppens wrote:
> On Thursday 17 March 2005 15:14, Casper Boemann wrote:
> > I just realised a place where the proposed layer offset iterator coods
> > break down.
> > When you make and iterator you do it with image coords
> > ..but when you query the iterator's  position you get device coords
> > So the iterator needs to be told the position which breaks encapsulation
>
> Well, in that patch, the pixel iterators just save a pointer to the paint
> device they're constructed with. When the iterator returns a position, it
> queries the paint device for the offset, so it can return the position in
> image coords.
Well yes that is a solution, but it is also a break of encapsulation, as the 
datamanager and iterators should know nothing of paintdevices.

-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list