iterator offset problem

Boudewijn Rempt boud at valdyas.org
Fri Mar 18 15:59:07 CET 2005


On Thursday 17 March 2005 23:16, Casper Boemann wrote:
> 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.

Cannot we construct the iterators with the offset as parameters? That doesn't 
break encapsulation, much, and the factory methods in kispaintdevice don't 
need to change.

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20050318/dfc52b2f/attachment.pgp


More information about the kimageshop mailing list