Select-by-color range and .isSelected()
Casper Boemann
cbr at boemann.dk
Fri Apr 1 14:36:52 CEST 2005
On Friday 01 April 2005 13:55, Boudewijn Rempt wrote:
> Selection is not an on/off binary value, but a range. The isSelected()
> method returns a boolean to the filters, and that's the first place where
> we go wrong.
Yes. Perhabs we should change the method to selectedness().
Also how about always assuming selection to be an 8 bit value. I think that
should be enough even in the future. That would make it easier to work with
so we don't have to go through a colorstrategy regarding selectedness
(eventhough the selection paintdevice should have the mask strategy attached
as now)
> It's not clear to me how we should handle a 50% selected
> pixel, either.
No, that is something I have puzzeled with too. For cutting I think we should
manipulate the src and dst pixels according to selectedness.
> Desaturate is easy: just halve the saturation in the hsv representation of
> a pixel. But oilpaint? Sharpen? What would be the meaning of 69% selected
> there? Blit the sharpened pixel with 69% opacity over its original?
yes over 31% original
In fact. for the moment I think we should just do what seems best in each
case. Later on when we can always change to a more total solution if we need
to.
--
best regards / venlig hilsen
Casper Boemann
More information about the kimageshop
mailing list