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

Silvio Heinrich plassy at web.de
Mon Feb 7 00:23:39 CET 2011


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 :/


More information about the kimageshop mailing list