[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-06 23:57:36
Message-ID: AANLkTinNXvkrs-zsF=tsqzJ8qJ5O7rBb87N69czhXKVY () 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">&lt;<a href="mailto:plassy@web.de">plassy@web.de</a>&gt;</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&#39;t compile, here the fixed versions:<br>
<div class="im"><br>
#ifndef _KO_COMPOSITEOPS_H_<br>
#define _KO_COMPOSITEOPS_H_<br>
<br>
#include &lt;KoColorSpace.h&gt;<br>
#include &lt;KoColorSpaceTraits.h&gt;<br>
</div>#include &lt;KoColorSpaceMaths.h&gt;<br>
<div class="im">#include &quot;compositeops/KoCompositeOpFunctions.h&quot;<br>
#include &quot;compositeops/KoCompositeOpGeneric.h&quot;<br>
<br>
</div><div class="im">template&lt;class T&gt;<br>
T cfTest(T src, T dst)<br>
{<br>
     return dst;<br>
}<br>
<br>
</div><div class="im">template&lt;class Traits&gt;<br>
void addStandardCompositeOps(KoColorSpace* cs)<br>
{<br>
</div>     cs-&gt;addCompositeOp(new KoCompositeOpGenericSC&lt;Traits, \
&amp;cfTest&gt;(cs,<br> <div class="im">COMPOSITE_VIVID_LIGHT, i18n(&quot;Vivid \
Light&quot;),<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 &lt;KoColorSpace.h&gt;<br>
#include &lt;KoColorSpaceTraits.h&gt;<br>
</div>#include &lt;KoColorSpaceMaths.h&gt;<br>
<div class="im">#include &quot;compositeops/KoCompositeOpFunctions.h&quot;<br>
#include &quot;compositeops/KoCompositeOpGeneric.h&quot;<br>
<br>
</div><div class="im">template&lt;class T&gt;<br>
T cfTest(T src, T dst)<br>
{<br>
     return KoColorSpaceMathsTraits&lt;T&gt;::zeroValue;<br>
}<br>
<br>
</div><div class="im">template&lt;class Traits&gt;<br>
void addStandardCompositeOps(KoColorSpace* cs)<br>
{<br>
</div>     cs-&gt;addCompositeOp(new KoCompositeOpGenericSC&lt;Traits, \
&amp;cfTest&gt;(cs,<br> <div class="im">COMPOSITE_VIVID_LIGHT, i18n(&quot;Vivid \
Light&quot;),<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