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

#include <KoCompositeOpFunctions.h>

+ Inheritance diagram for CFAdditiveSubtractive< 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 CFAdditiveSubtractive< T >

Definition at line 712 of file KoCompositeOpFunctions.h.

Member Function Documentation

◆ composeChannel()

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

Definition at line 713 of file KoCompositeOpFunctions.h.

713 {
714 using namespace Arithmetic;
715
716 // min(1,max(0,abs(sqr(CB)-sqr(CT))))
717 qreal x = sqrt(scale<qreal>(dst)) - sqrt(scale<qreal>(src));
718 return scale<T>(qAbs(x));
719 }

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