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

#include <KisScreentoneScreentoneFunctions.h>

+ Inheritance diagram for KisScreentoneScreentoneFunctions::DotsEllipseSinusoidal:

Public Member Functions

qreal operator() (qreal x, qreal y) const
 

Detailed Description

Definition at line 107 of file KisScreentoneScreentoneFunctions.h.

Member Function Documentation

◆ operator()()

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

Definition at line 124 of file KisScreentoneScreentoneFunctions.cpp.

125{
126 // The "0.4" and "0.6" values make a function such that if one thresholds it
127 // at 0.4 the resulting shape touches the borders of the cell horizontally
128 // and if one thresholds it at "0.6" it touches the cell vertically. That is
129 // the standard convention
130 x = sin(x) * 0.4;
131 y = sin(y) * 0.6;
132 // We would need to divide the following by ("0.4" + "0.6"), but since that is
133 // equal to 1, we skip it. The division is required to normalize the values
134 // of the function. If those magic numbers change, and they don't sum to 1,
135 // then we must divide
136 return (x + y);
137}

References KisScreentoneScreentoneFunctions::sin().


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