koffice/krita

Boudewijn Rempt boud at valdyas.org
Fri Aug 27 13:19:23 CEST 2004


On Friday 27 August 2004 12:39, Cyrille Berger wrote:
> > I wish I knew how to move the tile cobbling from
> > KisPainter to somewhere local to KisTileMgr.
>
> we just have to rewrite the bitBlts functions to use iterators, 

Currently one of the advantages of working with larger chunks of image is that 
operations like the COMPOSITE_COPY and COMPOSITE_OVER where opacity == 
OPACITY_OPAQUE can just memcpy the whole chunk, leading to better 
performance.

On the other hand, when we get down to more advanced things like adjustment 
layers, compositing layers with a different colour strategy or showing only 
one channel, we cannot take these shortcuts anyway.

(That reminds me -- I had once code that presented channels as vector instead 
of a pointer to an array -- need to resurrect that.)

> but we need 
> first to redisign composite operation, I had started that (just before
> leaving), but someone have removed the code I put in core/compositeop...

That was me. The compositeOp class got in the way, and the design seemed 
broken to me -- I'd already done something almost exactly like that, and 
decided against it.

Since composition is a colour strategy internal thing, you don't need to pass 
classes around. All that the rest of Krita needs to have is a list of 
composite ops that the current color strategy supports for the UI; the string 
can then be passed (instead of the current enum) to the colour strategy which 
can do whatever it wants internally to honor that request.

so:

QStringList KisStrategyColorSpace::getCompositeOps() = 0;

and

virtual void KisStrategyColorSpace::bitBlt(Q_INT32 stride,
       QUANTUM *dst, 
       Q_INT32 dststride,
       QUANTUM *src, 
       Q_INT32 srcstride,
       Q_INT32 rows, 
       Q_INT32 cols, 
       const QString & compositeOp) const = 0;
 
virtual void KisStrategyColorSpace::bitBlt(Q_INT32 stride,
       QUANTUM *dst, 
       Q_INT32 dststride,
       QUANTUM *src, 
       Q_INT32 srcstride,
       QUANTUM opacity,
       Q_INT32 rows, 
       Q_INT32 cols, 
       const QString & compositeOp) const = 0;

is all the API I want the color strategies to expose to the rest of Krita.

-- 
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/20040827/e9b5909b/attachment.pgp


More information about the kimageshop mailing list