#include <kis_color_source.h>
Definition at line 66 of file kis_color_source.h.
◆ KisPlainColorSource()
| KisPlainColorSource::KisPlainColorSource |
( |
const KoColor & | backGroundColor, |
|
|
const KoColor & | foreGroundColor ) |
Definition at line 70 of file kis_color_source.cpp.
74{
75}
KoColor m_cachedBackGroundColor
KoColor m_foreGroundColor
KoColor m_backGroundColor
◆ ~KisPlainColorSource()
| KisPlainColorSource::~KisPlainColorSource |
( |
| ) |
|
|
override |
◆ selectColor()
This is function is called to initialize the color that will be used for the dab.
- Parameters
-
| mix | is a parameter between 0.0 and 1.0 |
| pi | paint information |
Implements KisColorSource.
Definition at line 81 of file kis_color_source.cpp.
82{
83 Q_UNUSED(pi);
84
89 }
90
91 const quint8 *colors[2];
94
95
96
97 const int weight = (mix == 1.0) ? 255 : (int)(mix * 256);
98 const qint16 weights[2] = { (qint16)(255 - weight), (qint16)weight };
99
101}
KoMixColorsOp * mixColorsOp
const KoColorSpace * colorSpace() const
return the current colorSpace
void fromKoColor(const KoColor &src)
virtual void mixColors(const quint8 *const *colors, const qint16 *weights, int nColors, quint8 *dst, int weightSum=255) const =0
References KoColor::colorSpace(), KoColor::data(), KoColor::fromKoColor(), m_backGroundColor, m_cachedBackGroundColor, KisUniformColorSource::m_color, m_foreGroundColor, KoMixColorsOp::mixColors(), and KoColorSpace::mixColorsOp.
◆ m_backGroundColor
| KoColor KisPlainColorSource::m_backGroundColor |
|
private |
◆ m_cachedBackGroundColor
| KoColor KisPlainColorSource::m_cachedBackGroundColor |
|
private |
◆ m_foreGroundColor
| KoColor KisPlainColorSource::m_foreGroundColor |
|
private |
The documentation for this class was generated from the following files: