Krita Source Code Documentation
Loading...
Searching...
No Matches
KoCompositeOpClampPolicy::ClampAsFloatHDR< 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::ClampAsFloatHDR< T >

Definition at line 76 of file KoCompositeOpClampPolicy.h.

Member Typedef Documentation

◆ channels_type

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

Definition at line 77 of file KoCompositeOpClampPolicy.h.

◆ compositetype

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

Definition at line 78 of file KoCompositeOpClampPolicy.h.

Member Function Documentation

◆ clampInvertedResult()

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

Definition at line 89 of file KoCompositeOpClampPolicy.h.

89 {
90 using namespace Arithmetic;
91 return clampToSDRTop<channels_type>(value);
92 }
float value(const T *src, size_t ch)

References value().

◆ clampResult()

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

Definition at line 84 of file KoCompositeOpClampPolicy.h.

84 {
85 using namespace Arithmetic;
86 return clampToSDRBottom<channels_type>(value);
87 }

References value().

◆ clampResultAllowNegative()

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

Definition at line 80 of file KoCompositeOpClampPolicy.h.

80 {
81 return value;
82 }

References value().

◆ clippedMaxValue()

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

◆ fixInfiniteAfterDivision()

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

Definition at line 94 of file KoCompositeOpClampPolicy.h.

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

References value().


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