30 m_currentGamutMask(nullptr),
31 m_maskPreviewActive(true),
56 painter->translate(
m_x,
m_y);
66 int newX=qBound(0, (x-
m_x),
width());
152 m_hue = qMin(hue, qreal(1));
155 if (hsvSaturation >= 0) {
169 if (hslSaturation >= 0) {
176 if (lightness >= 0) {
183 if (hsiSaturation >= 0) {
190 if (intensity >= 0) {
197 if (hsySaturation >= 0) {
205 m_luma = qMin(luma, qreal(1));
float value(const T *src, size_t ch)
const KoColorSpace * colorSpace() const
virtual bool containsPointInComponentCoords(int x, int y) const
void toggleGamutMask(bool state)
const KoColorSpace * colorSpace() const
void update()
request for repaint, for instance, if the hue changes.
void setLastMousePosition(int x, int y)
virtual void mouseEvent(int x, int y)
saves the mouse position, so that a blip can be created.
void setDirty()
force subsequent redraw of the component
const KoColorSpace * m_lastColorSpace
KisColorSelector * m_parent
KoGamutMaskSP m_currentGamutMask
void setParam(qreal hue, qreal hsvSaturation, qreal value, qreal hslSaturation, qreal lightness, qreal hsiSaturation, qreal intensity, qreal hsySaturation, qreal luma)
bool isDirty() const
returns true, if ether the color space, the size or the parameters have changed since the last paint ...
KisColorSelectorComponent(KisColorSelector *parent)
virtual bool allowsColorSelectionAtPoint(const QPoint &) const
virtual void setColor(const KoColor &color)
set the color, blibs etc
void setConfiguration(Parameter param, Type type)
setConfiguration can be ignored (for instance ring and triangle, as they can have only one config)
void paintEvent(QPainter *)
void updateGamutMaskPreview()
KoColor m_lastSelectedColor
virtual KoColor selectColor(int x, int y)=0
this method must be overloaded to return the color at position x/y and draw a marker on that position
void setGamutMask(KoGamutMaskSP gamutMask)
virtual void paint(QPainter *)=0
KoColor currentColor()
return the color, that was selected by calling mouseEvent
void setGeometry(int x, int y, int width, int height)
static bool qFuzzyCompare(half p1, half p2)