Krita Source Code Documentation
Loading...
Searching...
No Matches
CFEquivalence< T > Struct Template Reference

#include <KoCompositeOpFunctions.h>

+ Inheritance diagram for CFEquivalence< T >:

Static Public Member Functions

static T composeChannel (T src, T dst)
 
- Static Public Member Functions inherited from KoClampedSourceAndDestinationBottomCompositeOpGenericFunctorBase< T >
static T clampDestinationChannelValue (T value)
 
static T clampSourceChannelValue (T value)
 

Detailed Description

template<class T>
struct CFEquivalence< T >

Definition at line 636 of file KoCompositeOpFunctions.h.

Member Function Documentation

◆ composeChannel()

template<class T >
static T CFEquivalence< T >::composeChannel ( T src,
T dst )
inlinestatic

Definition at line 637 of file KoCompositeOpFunctions.h.

637 {
638 using namespace Arithmetic;
639 typedef typename KoColorSpaceMathsTraits<T>::compositetype composite_type;
640 // TODO: is the formula correct?
641 // 1 - abs(dst - src)
642 composite_type x = qAbs(composite_type(dst) - src);
643 return clamp<T>(x);
644 }

The documentation for this struct was generated from the following file: