Krita Source Code Documentation
Loading...
Searching...
No Matches
KisScreentoneScreentoneFunctions::DotsDiamondEqualized Class Reference

#include <KisScreentoneScreentoneFunctions.h>

+ Inheritance diagram for KisScreentoneScreentoneFunctions::DotsDiamondEqualized:

Public Member Functions

qreal operator() (qreal x, qreal y) const
 
- Public Member Functions inherited from KisScreentoneScreentoneFunctions::DotsDiamond
qreal operator() (qreal x, qreal y) const
 

Detailed Description

Definition at line 137 of file KisScreentoneScreentoneFunctions.h.

Member Function Documentation

◆ operator()()

qreal KisScreentoneScreentoneFunctions::DotsDiamondEqualized::operator() ( qreal x,
qreal y ) const

Definition at line 178 of file KisScreentoneScreentoneFunctions.cpp.

179{
180 // Here the cumulative function is a piecewise function obtained
181 // analytically. If the value is less than or equal to "0.5" then the
182 // coverage is simply the area of the diamond and if the value is greater
183 // than "0.5" then the coverage is the area of the intersection between the
184 // diamond and the screen cell
185 const qreal z = DotsDiamond::operator()(x, y);
186 if (z <= 0.5) {
187 return 2.0 * z * z;
188 } else {
189 return -2.0 * z * z + 4.0 * z - 1.0;
190 }
191}

References KisScreentoneScreentoneFunctions::DotsDiamond::operator()().


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