#include <KoSegmentGradient.h>
Definition at line 191 of file KoSegmentGradient.h.
◆ LinearInterpolationStrategy()
| KoGradientSegment::LinearInterpolationStrategy::LinearInterpolationStrategy |
( |
| ) |
|
|
inlineprivate |
◆ calcValueAt()
| qreal KoGradientSegment::LinearInterpolationStrategy::calcValueAt |
( |
qreal | t, |
|
|
qreal | middle ) |
|
static |
Definition at line 748 of file KoSegmentGradient.cpp.
749{
750 Q_ASSERT(t > -DBL_EPSILON && t < 1 + DBL_EPSILON);
751 Q_ASSERT(middle > -DBL_EPSILON && middle < 1 + DBL_EPSILON);
752
754
755 if (t <= middle) {
756 if (middle < DBL_EPSILON) {
758 } else {
759 value = (t / middle) * 0.5;
760 }
761 } else {
762 if (middle > 1 - DBL_EPSILON) {
764 } else {
765 value = ((t - middle) / (1 - middle)) * 0.5 + 0.5;
766 }
767 }
768
770}
float value(const T *src, size_t ch)
References value().
◆ instance()
Definition at line 738 of file KoSegmentGradient.cpp.
739{
743 }
744
746}
LinearInterpolationStrategy()
static LinearInterpolationStrategy * m_instance
◆ type()
| int KoGradientSegment::LinearInterpolationStrategy::type |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ valueAt()
| qreal KoGradientSegment::LinearInterpolationStrategy::valueAt |
( |
qreal | t, |
|
|
qreal | middle ) const |
|
overridevirtual |
◆ m_instance
The documentation for this class was generated from the following files: