Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_color_selector_wheel.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2010 Adam Celarek <kdedev at xibo dot at>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KIS_COLOR_SELECTOR_WHEEL_H
8#define KIS_COLOR_SELECTOR_WHEEL_H
9
10typedef unsigned int QRgb;
11
12#include <QColor>
13#include <QImage>
14#include <QSize>
15
16#include "KoColor.h"
18
19namespace Acs {
20 class PixelCacheRenderer;
21}
22
24{
25 Q_OBJECT
26public:
28 void setColor(const KoColor &color) override;
29
30protected:
31 KoColor selectColor(int x, int y) override;
32 void paint(QPainter*) override;
33
34private:
36 KoColor colorAt(float x, float y, bool forceValid = false);
37
38private:
39 bool allowsColorSelectionAtPoint(const QPoint &pt) const override;
43 qreal R {0.0};
44 qreal G {0.0};
45 qreal B {0.0};
46 qreal Gamma {0.0};
47
51 QTransform m_toRenderArea;
52};
53
54#endif // KIS_COLOR_SELECTOR_WHEEL_H
KoColor selectColor(int x, int y) override
this method must be overloaded to return the color at position x/y and draw a marker on that position
KisColorSelectorWheel(KisColorSelector *parent)
void paint(QPainter *) override
KoColor colorAt(float x, float y, bool forceValid=false)
bool allowsColorSelectionAtPoint(const QPoint &pt) const override
void setColor(const KoColor &color) override
set the color, blibs etc
unsigned int QRgb