bltSelection

Boudewijn Rempt boud at valdyas.org
Tue Jun 14 15:42:35 CEST 2005


On Tuesday 14 June 2005 15:30, Casper Boemann wrote:
> Hi
>
> I suggest changing bitBlt (and all composite operations) to take an alpha
> mask into consideration)
>
> This is because currently bltSelection is flawed:
>  - it's colorspace dependent. It assumes channels are 1 byte
>  - it applies the selection to the source.
>  - it uses "alpha" as MIN(sel,alpha).
>  - it blits 1 pixel at a time
>
> Every composite op needs to be changed though to take a Q_UINT8 *sel
> pointer and if the pointer is !=0 use it
>
> bitBlt would then pass NULL as the pointer
> bltSelection would pass a pointer to the selection data.
> bltExtSelection would pass a pointer to the external selection data.

I think I agree. The alpha mask is indeed the third chunk of raster data that 
is involved in blitting. Maybe not call it *sel, but *srcMask or something 
like that -- it is, after all, a mask that masks the source pixels.

-- 
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/20050614/1eaa8566/attachment.pgp


More information about the kimageshop mailing list