|
Krita Source Code Documentation
|
#include <KoColorDisplayRendererInterface.h>
Inheritance diagram for KoColorDisplayRendererInterface:Signals | |
| void | displayConfigurationChanged () |
Public Member Functions | |
| virtual KoColor | approximateFromRenderedQColor (const QColor &c) const =0 |
| virtual KoColor | fromHsv (int h, int s, int v, int a=255) const =0 |
| virtual void | getHsv (const KoColor &srcColor, int *h, int *s, int *v, int *a=0) const =0 |
| virtual const KoColorSpace * | getPaintingColorSpace () const =0 |
| getColorSpace | |
| KoColorDisplayRendererInterface () | |
| virtual qreal | maxVisibleFloatValue (const KoChannelInfo *chaninfo) const =0 |
| virtual qreal | minVisibleFloatValue (const KoChannelInfo *chaninfo) const =0 |
| virtual QColor | toQColor (const KoColor &c, bool proofToPaintColors=false) const =0 |
| 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. | |
| ~KoColorDisplayRendererInterface () override | |
A special interface class provided by pigment to let widgets render a KoColor on screen using custom profiling provided by the user.
If you want to provide your own rendering of the KoColor on screen, reimplement this class and provide its instance to a supporting widget.
Definition at line 26 of file KoColorDisplayRendererInterface.h.
| KoColorDisplayRendererInterface::KoColorDisplayRendererInterface | ( | ) |
Definition at line 18 of file KoColorDisplayRendererInterface.cpp.
|
override |
Definition at line 22 of file KoColorDisplayRendererInterface.cpp.
|
pure virtual |
This tries to approximate a rendered QColor into the KoColor of the painting color space. Please note, that in most of the cases the exact reverse transformation does not exist, so the resulting color will be only a rough approximation. Never try to do a round trip like that:
// r will never be equal to c! r = approximateFromRenderedQColor(toQColor(c));
Implemented in KoDumbColorDisplayRenderer, and KisDisplayColorConverter::Private::DisplayRenderer.
|
signal |
|
pure virtual |
Implemented in KisDisplayColorConverter::Private::DisplayRenderer, and KoDumbColorDisplayRenderer.
|
pure virtual |
Implemented in KisDisplayColorConverter::Private::DisplayRenderer, and KoDumbColorDisplayRenderer.
|
pure virtual |
getColorSpace
Implemented in KoDumbColorDisplayRenderer, and KisDisplayColorConverter::Private::DisplayRenderer.
|
pure virtual |
Implemented in KoDumbColorDisplayRenderer, and KisDisplayColorConverter::Private::DisplayRenderer.
|
pure virtual |
Implemented in KoDumbColorDisplayRenderer, and KisDisplayColorConverter::Private::DisplayRenderer.
|
pure virtual |
Convert the color c to a custom QColor that will be displayed by the widget on screen. Please note, that the reverse conversion may simply not exist.
| proofPaintColors | optionally adjust the color data to painting gamut first |
Implemented in KoDumbColorDisplayRenderer, and KisDisplayColorConverter::Private::DisplayRenderer.
|
pure virtual |
Convert a consecutive block of pixel data to an ARGB32 QImage.
| srcColorSpace | the colorspace the pixel data is in |
| data | a pointer to a byte array with color data; must cover the requested image size |
| size | defines the dimensions of the resulting image |
| proofPaintColors | optionally adjust the color data to painting gamut first |
Implemented in KoDumbColorDisplayRenderer, and KisDisplayColorConverter::Private::DisplayRenderer.