On Mon, Feb 7, 2011 at 12:23 AM, Silvio Heinrich <plassy@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.