Rotation/Scale/Transform visitor design

Casper Boemann cbr at boemann.dk
Thu Apr 21 20:26:24 CEST 2005


On Thursday 21 April 2005 19:33, Boudewijn Rempt wrote:
> I think that the visitor moniker for these classes is wrong; they do not
> visit any number of paint devices according to certain rules (e.g. the
> merge visitor visits paint devices according to visibility), but they act
> on a paint device like painters -- the whole visitor pattern simply isn't
> there.
ideed. I thought of (after release) change so it uses the visitor pattern we 
have. But I don't know why - we could just as well do without.

> Casper pointed out to me the desirablilty to have the rotation work from a
> source paint device onto a destination paint device, and obeying the
> selection masks. That's a good point, although I don't agree with clearing
> the selection of the source device automatically, that must be an option,
> especially if src and dst devices are not the same
Yes, sounds like a smart option

> , it may be useful to 
> have a way to just copy the transformed image onto the dst device..
Yes for single pass transforms we perhabs should have that.

But most transforms including scale and rotate are two or more pass 
transforms, where we just put the final result onto the dst and have temp 
device inbetween.

> Anyway, we'd better remove the visitor name, and maybe rename to painter,
> too.
Yes fine with me
-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list