Blitting per channel

Boudewijn Rempt boud at valdyas.org
Thu Sep 9 21:59:18 CEST 2004


I'm working on selection cut & copy, and I think it would 
be easiest to 

* blit all the pixels in the rect that contains all selected pixels onto the 
floating selection layer
* blit the selection's inverted alpha channel onto the floating selection's
alpha channel.

For this, I need to be able to blit only the bytes in a certain channel. 
However, extending this a bit means that we could finally enable the channel 
box -- if it is possible to blit a certain set of channels, ignoring the 
rest.

A complication is that it might be necessary to blit a channel of ChannelInfo 
X onto a channel of ChannelInfo Y; a translation may thus be needed.

Now I feel there are two possibilities:

1. Pass a vector of ChannelInfo pairs to KisPainter::bitBlt all the way down 
to the color strategy bitBlt's, and interpret them there.

2. Make the colour strategies stateful, and add that vector of ChannelInfo 
pairs to translate from src to dev. This is a fair bit of work.

3. Redesign the rendering pipeline and do something even more clever...

I'm currently leaning towards going for 1, but I'm not quite sure whether it's 
the best solution.

-- 
Boudewijn Rempt | "Geef mij maar zuurtjes."
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/20040909/14962e60/attachment.pgp


More information about the kimageshop mailing list