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

#include <KoCompositeOpGenericFunctorBase.h>

Static Public Member Functions

static T clampDestinationChannelValue (T value)
 
static T clampSourceChannelValue (T value)
 

Detailed Description

template<typename T>
struct KoCompositeOpGenericFunctorBase< T >

KoCompositeOpGenericFunctorBase is a set of policies for KoCompositeOpGenericSCFunctor that defines clamping of source and destination channels before passing them to the composite function.

We cannot clamp the data in the composite function itself, because KoCompositeOpGenericSCFunctor also dose quite heavy blending of the channels when alpha values are non-null

IMPORTANT: these policies work with channels_type, not with composite_type! Hence they do nothing for integer color spaces!

Definition at line 28 of file KoCompositeOpGenericFunctorBase.h.

Member Function Documentation

◆ clampDestinationChannelValue()

template<typename T >
static T KoCompositeOpGenericFunctorBase< T >::clampDestinationChannelValue ( T value)
inlinestatic

Definition at line 34 of file KoCompositeOpGenericFunctorBase.h.

34 {
35 return value;
36 }
float value(const T *src, size_t ch)

References value().

◆ clampSourceChannelValue()

template<typename T >
static T KoCompositeOpGenericFunctorBase< T >::clampSourceChannelValue ( T value)
inlinestatic

Definition at line 30 of file KoCompositeOpGenericFunctorBase.h.

30 {
31 return value;
32 }

References value().


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