How to scale selections?
boud at valdyas.org
Fri Jul 1 19:26:56 CEST 2005
> On Friday 01 July 2005 17:51, Casper Boemann wrote:
> > the simplest is to just take dev->selection() it returns the selection
> > which is a paintdevice in itself.
> Shouldn't there be a m_selection in KisImage? KisImage has a list of all
> layers, so I think it should also has the selection.
That's not the way to go: there is one active selection as there is
one active layer, but we should be prepared for the moment when layers
can have many selections and the selections are persistent to their
> Right now the code in KisImage iterates over all layers and rescales them. I
> think it should just call the scale visitor with the selection (the scale
> visitor just takes a paint device, so that should not be a problem). I could
> implement this in the scale code itself, but there is only one selection for
> an image, isn't it? So it does not make much sense to do this for each layer.
> Or is there one selection per layer. Then it would make sense to do this.
Or the visitor should have a flag "also visit the selection" and visit all
selections for all layers it visits.
More information about the kimageshop