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

Definition at line 14 of file KoCompositeOpClampPolicy.h.

Member Typedef Documentation

◆ channels_type

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

Definition at line 15 of file KoCompositeOpClampPolicy.h.

◆ compositetype

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

Definition at line 16 of file KoCompositeOpClampPolicy.h.

Member Function Documentation

◆ clampInvertedResult()

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

Definition at line 28 of file KoCompositeOpClampPolicy.h.

28 {
29 using namespace Arithmetic;
30 return clampToSDR<channels_type>(value);
31 }
float value(const T *src, size_t ch)

References value().

◆ clampResult()

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

Definition at line 23 of file KoCompositeOpClampPolicy.h.

23 {
24 using namespace Arithmetic;
25 return clampToSDR<channels_type>(value);
26 }

References value().

◆ clampResultAllowNegative()

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

Definition at line 18 of file KoCompositeOpClampPolicy.h.

18 {
19 using namespace Arithmetic;
20 return clampToSDR<channels_type>(value);
21 }

References value().

◆ clippedMaxValue()

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

Definition at line 37 of file KoCompositeOpClampPolicy.h.

37 {
38 using namespace Arithmetic;
39 return unitValue<T>();
40 }

◆ fixInfiniteAfterDivision()

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

Definition at line 33 of file KoCompositeOpClampPolicy.h.

33 {
34 return value;
35 }

References value().


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