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

#include <KisScreentoneScreentoneFunctions.h>

Public Member Functions

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

Detailed Description

Definition at line 119 of file KisScreentoneScreentoneFunctions.h.

Member Function Documentation

◆ operator()()

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

Definition at line 161 of file KisScreentoneScreentoneFunctions.cpp.

162{
163 // This is the function used for the elliptical spots in Krita 4.*
164 // It is wrong because it produces too dark values. The function should
165 // produce a value of 1 at the corners of the screen cell
166 constexpr qreal ellipseRatioX = 0.4 / M_SQRT2;
167 constexpr qreal ellipseRatioY = 0.6 / M_SQRT2;
168 x = triangle(x) * ellipseRatioX;
169 y = triangle(y) * ellipseRatioY;
170 return std::sqrt(x * x + y * y) * M_SQRT2;
171}

References KisScreentoneScreentoneFunctions::triangle().


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