[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: Patch: Many composite/blend modes mostly compatible to Adobe
From: Sven Langkamp <sven.langkamp () gmail ! com>
Date: 2011-02-07 0:03:22
Message-ID: AANLkTinpzsJtkvy7CmwF8yVxR-+ABLHjmHRwk7cLoVeg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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.
[Attachment #5 (text/html)]
<div class="gmail_quote">On Mon, Feb 7, 2011 at 12:23 AM, Silvio Heinrich <span \
dir="ltr"><<a href="mailto:plassy@web.de">plassy@web.de</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, \
204); padding-left: 1ex;"> <br>
Arg... the last two versions won't compile, here the fixed versions:<br>
<div class="im"><br>
#ifndef _KO_COMPOSITEOPS_H_<br>
#define _KO_COMPOSITEOPS_H_<br>
<br>
#include <KoColorSpace.h><br>
#include <KoColorSpaceTraits.h><br>
</div>#include <KoColorSpaceMaths.h><br>
<div class="im">#include "compositeops/KoCompositeOpFunctions.h"<br>
#include "compositeops/KoCompositeOpGeneric.h"<br>
<br>
</div><div class="im">template<class T><br>
T cfTest(T src, T dst)<br>
{<br>
return dst;<br>
}<br>
<br>
</div><div class="im">template<class Traits><br>
void addStandardCompositeOps(KoColorSpace* cs)<br>
{<br>
</div> cs->addCompositeOp(new KoCompositeOpGenericSC<Traits, &cfTest>(cs,<br>
<div class="im">COMPOSITE_VIVID_LIGHT, i18n("Vivid Light"),<br>
KoCompositeOp::categoryLight(), true));<br>
}<br>
<br>
// _KO_COMPOSITEOPS_H_<br>
<br>
and:<br>
<br>
#ifndef _KO_COMPOSITEOPS_H_<br>
#define _KO_COMPOSITEOPS_H_<br>
<br>
#include <KoColorSpace.h><br>
#include <KoColorSpaceTraits.h><br>
</div>#include <KoColorSpaceMaths.h><br>
<div class="im">#include "compositeops/KoCompositeOpFunctions.h"<br>
#include "compositeops/KoCompositeOpGeneric.h"<br>
<br>
</div><div class="im">template<class T><br>
T cfTest(T src, T dst)<br>
{<br>
return KoColorSpaceMathsTraits<T>::zeroValue;<br>
}<br>
<br>
</div><div class="im">template<class Traits><br>
void addStandardCompositeOps(KoColorSpace* cs)<br>
{<br>
</div> cs->addCompositeOp(new KoCompositeOpGenericSC<Traits, &cfTest>(cs,<br>
<div class="im">COMPOSITE_VIVID_LIGHT, i18n("Vivid Light"),<br>
KoCompositeOp::categoryLight(), true));<br>
}<br>
<br>
// _KO_COMPOSITEOPS_H_<br>
<br>
</div>Sorry for all the hassle :/<br>
<div><div></div><br></div></blockquote><div><br>Both compile. <br></div></div>
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic