Krita Source Code Documentation
Loading...
Searching...
No Matches
KoColorDisplayRendererInterface.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6
7#ifndef __KO_COLOR_DISPLAY_RENDERER_INTERFACE_H
8#define __KO_COLOR_DISPLAY_RENDERER_INTERFACE_H
9
10#include <QObject>
11#include <QColor>
12
13#include "KoColor.h"
14
15class KoChannelInfo;
16class KoColorSpace;
17
26class KRITAPIGMENT_EXPORT KoColorDisplayRendererInterface : public QObject
27{
28 Q_OBJECT
29
30public:
33
42 virtual QImage toQImage(const KoColorSpace *srcColorSpace, const quint8 *data, QSize size, bool proofPaintColors = false) const = 0;
43
50 virtual QColor toQColor(const KoColor &c, bool proofToPaintColors = false) const = 0;
51
62 virtual KoColor approximateFromRenderedQColor(const QColor &c) const = 0;
63
64 virtual KoColor fromHsv(int h, int s, int v, int a = 255) const = 0;
65 virtual void getHsv(const KoColor &srcColor, int *h, int *s, int *v, int *a = 0) const = 0;
66
67
72 virtual qreal minVisibleFloatValue(const KoChannelInfo *chaninfo) const = 0;
73
79 virtual qreal maxVisibleFloatValue(const KoChannelInfo *chaninfo) const = 0;
80
85 virtual const KoColorSpace* getPaintingColorSpace() const = 0;
86
87Q_SIGNALS:
89
90private:
92};
93
100{
101public:
102 QImage toQImage(const KoColorSpace *srcColorSpace, const quint8 *data, QSize size, bool proofPaintColors = false) const override;
103 QColor toQColor(const KoColor &c, bool proofToPaintColors = false) const override;
104 KoColor approximateFromRenderedQColor(const QColor &c) const override;
105 KoColor fromHsv(int h, int s, int v, int a = 255) const override;
106 void getHsv(const KoColor &srcColor, int *h, int *s, int *v, int *a = 0) const override;
107
108 qreal minVisibleFloatValue(const KoChannelInfo *chaninfo) const override;
109 qreal maxVisibleFloatValue(const KoChannelInfo *chaninfo) const override;
110
111 const KoColorSpace* getPaintingColorSpace() const override;
112
114};
115
116#endif /* __KO_COLOR_DISPLAY_RENDERER_INTERFACE_H */
qreal v
PythonPluginManager * instance
virtual void getHsv(const KoColor &srcColor, int *h, int *s, int *v, int *a=0) const =0
virtual KoColor approximateFromRenderedQColor(const QColor &c) const =0
virtual qreal minVisibleFloatValue(const KoChannelInfo *chaninfo) const =0
virtual QColor toQColor(const KoColor &c, bool proofToPaintColors=false) const =0
virtual const KoColorSpace * getPaintingColorSpace() const =0
getColorSpace
virtual QImage toQImage(const KoColorSpace *srcColorSpace, const quint8 *data, QSize size, bool proofPaintColors=false) const =0
Convert a consecutive block of pixel data to an ARGB32 QImage.
virtual KoColor fromHsv(int h, int s, int v, int a=255) const =0
virtual qreal maxVisibleFloatValue(const KoChannelInfo *chaninfo) const =0