Krita Source Code Documentation
Loading...
Searching...
No Matches
CFDecreaseSaturation< HSXType, channels_type > Struct Template Reference

#include <KoCompositeOpFunctions.h>

+ Inheritance diagram for CFDecreaseSaturation< HSXType, channels_type >:

Static Public Member Functions

static void composeChannels (float srcR, float srcG, float srcB, float &dstR, float &dstG, float &dstB)
 
- Static Public Member Functions inherited from KoClampedSourceAndDestinationCompositeOpGenericFunctorBase< channels_type >
static channels_type clampDestinationChannelValue (channels_type value)
 
static channels_type clampSourceChannelValue (channels_type value)
 

Detailed Description

template<class HSXType, typename channels_type>
struct CFDecreaseSaturation< HSXType, channels_type >

Definition at line 258 of file KoCompositeOpFunctions.h.

Member Function Documentation

◆ composeChannels()

template<class HSXType , typename channels_type >
static void CFDecreaseSaturation< HSXType, channels_type >::composeChannels ( float srcR,
float srcG,
float srcB,
float & dstR,
float & dstG,
float & dstB )
inlinestatic

Definition at line 260 of file KoCompositeOpFunctions.h.

260 {
261 using namespace Arithmetic;
262 float sat = lerp(zeroValue<float>(), getSaturation<HSXType>(dstR, dstG, dstB), getSaturation<HSXType>(srcR, srcG, srcB));
263 float light = getLightness<HSXType>(dstR, dstG, dstB);
264 setSaturation<HSXType>(dstR, dstG, dstB, sat);
265 setLightness<HSXType>(dstR, dstG, dstB, light);
266 possiblyFixNegativeValuesNearZeroPoint<channels_type>(dstR, dstG, dstB);
267 }
QPointF lerp(const QPointF &p1, const QPointF &p2, qreal t)

References lerp().


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