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

#include <KisScreentoneScreentoneFunctions.h>

+ Inheritance diagram for KisScreentoneScreentoneFunctions::DotsEllipseSinusoidalEqualized:

Public Member Functions

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

Detailed Description

Definition at line 113 of file KisScreentoneScreentoneFunctions.h.

Member Function Documentation

◆ operator()()

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

Definition at line 139 of file KisScreentoneScreentoneFunctions.cpp.

140{
141 // Here the cumulative function is a piecewise function obtained empirically
142 // by fitting some simple cubic curves to a list of points
143 const qreal z = DotsEllipseSinusoidal::operator()(x, y);
144 const qreal z2 = z * z;
145 const qreal z3 = z * z2;
146 if (z <= 0.3) {
147 return 0.8795 * z3 + 0.1825 * z2 + 0.6649 * z + 0.0008;
148 } else if (z <= 0.4) {
149 return 32.0507 * z3 - 30.3781 * z2 + 10.6756 * z - 1.0937;
150 } else if (z <= 0.5) {
151 return 27.8089 * z3 - 39.4726 * z2 + 19.8992 * z - 3.0553;
152 } else if (z <= 0.6) {
153 return 35.1490 * z3 - 55.6810 * z2 + 30.6244 * z - 5.2839;
154 } else if (z <= 0.7) {
155 return 24.3210 * z3 - 50.1381 * z2 + 35.6452 * z - 7.9322;
156 } else {
157 return 0.7457 * z3 - 2.4792 * z2 + 3.3748 * z - 0.6402;
158 }
159}

References KisScreentoneScreentoneFunctions::DotsEllipseSinusoidal::operator()().


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