Krita Source Code Documentation
Loading...
Searching...
No Matches
KoCompositeOpClampPolicy::ClampAsFloatSDR< T > Struct Template Reference

#include <KoCompositeOpClampPolicy.h>

Public Types

using channels_type = T
 
using compositetype = typename KoColorSpaceMathsTraits<T>::compositetype
 

Static Public Member Functions

static channels_type clampInvertedResult (compositetype value)
 
static channels_type clampResult (compositetype value)
 
static channels_type clampResultAllowNegative (compositetype value)
 
static T clippedMaxValue ()
 
static compositetype fixInfiniteAfterDivision (compositetype value)
 

Detailed Description

template<typename T>
struct KoCompositeOpClampPolicy::ClampAsFloatSDR< T >

Definition at line 44 of file KoCompositeOpClampPolicy.h.

Member Typedef Documentation

◆ channels_type

template<typename T >
using KoCompositeOpClampPolicy::ClampAsFloatSDR< T >::channels_type = T

Definition at line 45 of file KoCompositeOpClampPolicy.h.

◆ compositetype

template<typename T >
using KoCompositeOpClampPolicy::ClampAsFloatSDR< T >::compositetype = typename KoColorSpaceMathsTraits<T>::compositetype

Definition at line 46 of file KoCompositeOpClampPolicy.h.

Member Function Documentation

◆ clampInvertedResult()

template<typename T >
static channels_type KoCompositeOpClampPolicy::ClampAsFloatSDR< T >::clampInvertedResult ( compositetype value)
inlinestatic

Definition at line 58 of file KoCompositeOpClampPolicy.h.

58 {
59 using namespace Arithmetic;
60 return clampToSDR<channels_type>(value);
61 }
float value(const T *src, size_t ch)

References value().

◆ clampResult()

template<typename T >
static channels_type KoCompositeOpClampPolicy::ClampAsFloatSDR< T >::clampResult ( compositetype value)
inlinestatic

Definition at line 53 of file KoCompositeOpClampPolicy.h.

53 {
54 using namespace Arithmetic;
55 return clampToSDR<channels_type>(value);
56 }

References value().

◆ clampResultAllowNegative()

template<typename T >
static channels_type KoCompositeOpClampPolicy::ClampAsFloatSDR< T >::clampResultAllowNegative ( compositetype value)
inlinestatic

Definition at line 48 of file KoCompositeOpClampPolicy.h.

48 {
49 using namespace Arithmetic;
50 return clampToSDR<channels_type>(value);
51 }

References value().

◆ clippedMaxValue()

template<typename T >
static T KoCompositeOpClampPolicy::ClampAsFloatSDR< T >::clippedMaxValue ( )
inlinestatic

Definition at line 69 of file KoCompositeOpClampPolicy.h.

69 {
70 using namespace Arithmetic;
71 return unitValue<T>();
72 }

◆ fixInfiniteAfterDivision()

template<typename T >
static compositetype KoCompositeOpClampPolicy::ClampAsFloatSDR< T >::fixInfiniteAfterDivision ( compositetype value)
inlinestatic

Definition at line 63 of file KoCompositeOpClampPolicy.h.

63 {
64 // Constantly dividing by small numbers can quickly make the result
65 // become infinity or NaN, so we check that and correct (kind of clamping)
67 }
typename KoColorSpaceMathsTraits< T >::compositetype compositetype

References value().


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