Krita Source Code Documentation
Loading...
Searching...
No Matches
KoMixColorsOpImpl.h File Reference
#include "KoMixColorsOp.h"
#include <QtGlobal>
#include <type_traits>
#include <KisCppQuirks.h>
#include <KoColorSpaceMaths.h>
#include "kis_debug.h"
#include "kis_global.h"

Go to the source code of this file.

Classes

struct  KoMixColorsOpImpl< _CSTrait >::ArrayOfPointers
 
class  KoMixColorsOpImpl< _CSTrait >
 
class  KoMixColorsOpImpl< _CSTrait >::MixDataResult
 
class  KoMixColorsOpImpl< _CSTrait >::MixerImpl
 
struct  KoMixColorsOpImpl< _CSTrait >::NoWeightsSurrogate
 
struct  KoMixColorsOpImpl< _CSTrait >::PointerToArray
 
struct  KoMixColorsOpImpl< _CSTrait >::WeightsWrapper
 

Functions

template<typename T >
static T safeDivideWithRound (T dividend, std::enable_if_t< std::numeric_limits< T >::is_integer, T > divisor)
 
template<typename T >
static T safeDivideWithRound (T dividend, std::enable_if_t<!std::numeric_limits< T >::is_integer, T > divisor)
 

Function Documentation

◆ safeDivideWithRound() [1/2]

template<typename T >
static T safeDivideWithRound ( T dividend,
std::enable_if_t< std::numeric_limits< T >::is_integer, T > divisor )
inlinestatic

Definition at line 29 of file KoMixColorsOpImpl.h.

30 {
31 return (dividend + divisor / 2) / divisor;
32}

◆ safeDivideWithRound() [2/2]

template<typename T >
static T safeDivideWithRound ( T dividend,
std::enable_if_t<!std::numeric_limits< T >::is_integer, T > divisor )
inlinestatic

Definition at line 23 of file KoMixColorsOpImpl.h.

24 {
25 return dividend / divisor;
26}