#include <kis_filter_strategy.h>
Definition at line 160 of file kis_filter_strategy.h.
◆ KisMitchellFilterStrategy()
| KisMitchellFilterStrategy::KisMitchellFilterStrategy |
( |
| ) |
|
|
inline |
◆ ~KisMitchellFilterStrategy()
| KisMitchellFilterStrategy::~KisMitchellFilterStrategy |
( |
| ) |
|
|
inlineoverride |
◆ valueAt()
| qreal KisMitchellFilterStrategy::valueAt |
( |
qreal | t, |
|
|
qreal | weightsPositionScale ) const |
|
overridevirtual |
Reimplemented from KisFilterStrategy.
Definition at line 172 of file kis_filter_strategy.cc.
173{
174 Q_UNUSED(weightsPositionScale);
175 const qreal
B = 1.0 / 3.0;
176 const qreal
C = 1.0 / 3.0;
177 qreal tt;
178
179 tt = t * t;
180 if (t < 0) t = -t;
181 if (t < 1.0) {
182 t = (((12.0 - 9.0 *
B - 6.0 *
C) * (t * tt)) + ((-18.0 + 12.0 *
B + 6.0 *
C) * tt) + (6.0 - 2 *
B));
183 return(t / 6.0);
184 } else if (t < 2.0) {
185 t = (((-1.0 *
B - 6.0 *
C) * (t * tt)) + ((6.0 *
B + 30.0 *
C) * tt) + ((-12.0 *
B - 48.0 *
C) * t) + (8.0 *
B + 24 *
C));
186 return(t / 6.0);
187 }
188 return(0.0);
189}
References B, and C.
The documentation for this class was generated from the following files: