Krita Source Code Documentation
Loading...
Searching...
No Matches
KisScreentoneBrightnessContrastFunctions::Threshold Class Reference

#include <KisScreentoneBrightnessContrastFunctions.h>

Public Member Functions

qreal operator() (qreal x) const
 
 Threshold (qreal threshold)
 

Private Attributes

const qreal m_threshold
 
const bool m_thresholdIsOne
 

Detailed Description

Definition at line 35 of file KisScreentoneBrightnessContrastFunctions.h.

Constructor & Destructor Documentation

◆ Threshold()

KisScreentoneBrightnessContrastFunctions::Threshold::Threshold ( qreal threshold)

Member Function Documentation

◆ operator()()

qreal KisScreentoneBrightnessContrastFunctions::Threshold::operator() ( qreal x) const

Definition at line 39 of file KisScreentoneBrightnessContrastFunctions.cpp.

40{
41 // In the extreme case where the threshold value is 1.0, we need to compare
42 // the value with 1.0, otherwise a value of 1.0 with a threshold of 1.0 will
43 // produce 1.0 as an output. The effect would be some white dots in an all
44 // black image, something not desirable.
45 return m_thresholdIsOne || x < m_threshold ? 0.0 : 1.0;
46}

References m_threshold, and m_thresholdIsOne.

Member Data Documentation

◆ m_threshold

const qreal KisScreentoneBrightnessContrastFunctions::Threshold::m_threshold
private

Definition at line 42 of file KisScreentoneBrightnessContrastFunctions.h.

◆ m_thresholdIsOne

const bool KisScreentoneBrightnessContrastFunctions::Threshold::m_thresholdIsOne
private

Definition at line 43 of file KisScreentoneBrightnessContrastFunctions.h.


The documentation for this class was generated from the following files: