Patch: Many composite/blend modes mostly compatible to Adobe Photoshop (c)

Sven Langkamp sven.langkamp at gmail.com
Mon Feb 7 00:57:36 CET 2011


On Mon, Feb 7, 2011 at 12:23 AM, Silvio Heinrich <plassy at web.de> wrote:

>
> Arg... the last two versions won't compile, here the fixed versions:
>
> #ifndef _KO_COMPOSITEOPS_H_
> #define _KO_COMPOSITEOPS_H_
>
> #include <KoColorSpace.h>
> #include <KoColorSpaceTraits.h>
> #include <KoColorSpaceMaths.h>
> #include "compositeops/KoCompositeOpFunctions.h"
> #include "compositeops/KoCompositeOpGeneric.h"
>
> template<class T>
> T cfTest(T src, T dst)
> {
>     return dst;
> }
>
> template<class Traits>
> void addStandardCompositeOps(KoColorSpace* cs)
> {
>      cs->addCompositeOp(new KoCompositeOpGenericSC<Traits, &cfTest>(cs,
> COMPOSITE_VIVID_LIGHT, i18n("Vivid Light"),
> KoCompositeOp::categoryLight(), true));
> }
>
> // _KO_COMPOSITEOPS_H_
>
> and:
>
> #ifndef _KO_COMPOSITEOPS_H_
> #define _KO_COMPOSITEOPS_H_
>
> #include <KoColorSpace.h>
> #include <KoColorSpaceTraits.h>
> #include <KoColorSpaceMaths.h>
> #include "compositeops/KoCompositeOpFunctions.h"
> #include "compositeops/KoCompositeOpGeneric.h"
>
> template<class T>
> T cfTest(T src, T dst)
> {
>     return KoColorSpaceMathsTraits<T>::zeroValue;
> }
>
> template<class Traits>
> void addStandardCompositeOps(KoColorSpace* cs)
> {
>      cs->addCompositeOp(new KoCompositeOpGenericSC<Traits, &cfTest>(cs,
> COMPOSITE_VIVID_LIGHT, i18n("Vivid Light"),
> KoCompositeOp::categoryLight(), true));
> }
>
> // _KO_COMPOSITEOPS_H_
>
> Sorry for all the hassle :/
>
>
Both compile.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20110207/70749371/attachment-0001.htm 


More information about the kimageshop mailing list