koffice/krita

Boudewijn Rempt boud at valdyas.org
Mon Aug 30 13:15:56 CEST 2004


On Monday 30 August 2004 12:08, Cyrille Berger wrote:

> I was thinking about that, with the IterratorsRect (btw, is someone working
> on them ?) 

Casper already answered that.

> we can have a function that do a memcpy, this will hide the 
> quantum to compositeop, which would have this prototype :
> compositeOp(KisIterratorsRect dst, KisIterratorsRect srcBegin,
> KisIterratorsRect srcEnd, QUANTUM opacity)

This sounds good: something we don't do enough is define the iterators and 
then pass them on to the algorithm, the way iterators were intended to be 
used, so this looks like a good step.

But there are a couple of problems with composition anyway, some linked to 
rendering, others more general.

If we want to render separate channels, we'll have to composite pixel-by-pixel 
anyway.

I want to make a new colour model for selections, instead of using four 
channels for what's effectively an alpha mask to a single colour -- and that 
means I need to composite two colour models together.

>
> And for instance composite copyt would look like this :
> compositeCopy(KisIterratorsRect dst, KisIterratorsRect srcBegin,
> KisIterratorsRect srcEnd, QUANTUM opacity)
> {
>  if(opacity == OPACITY_OPAQUE)
>  {
>   dst.memcpy( srcBegin, srcEnd);
>  }
>  else {
>   ...
>  }
> }
>
> This will hide the QUANTUM* and TileMgr to the strategy, which is something
> we were wanting to achieve.

Because of the problem with selections, I'm messing with the composition code 
anyway -- I'll keep this in mind, and I've just asked Casper for what he 
already has in the matter of rect codes, so perhaps I can work something out. 
It's blocking the work I want to do selections right now (although I could 
also do the other selection tools first, and the select-by-colour dialog).

-- 
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/20040830/2135a2df/attachment.pgp


More information about the kimageshop mailing list