|
Krita Source Code Documentation
|
#include <KoHistogramProducer.h>
Inheritance diagram for KoHistogramProducer:Public Member Functions | |
| virtual void | addRegionToBin (const quint8 *pixels, const quint8 *selectionMask, quint32 nPixels, const KoColorSpace *colorSpace)=0 |
| virtual QList< KoChannelInfo * > | channels ()=0 |
| virtual void | clear ()=0 |
| virtual qint32 | count ()=0 |
| virtual qint32 | getBinAt (qint32 channel, qint32 position)=0 |
| virtual const KoID & | id () const =0 |
| KoHistogramProducer () | |
| virtual qreal | maximalZoom () const =0 |
| virtual qint32 | numberOfBins ()=0 |
| virtual qint32 | outOfViewLeft (qint32 channel)=0 |
| virtual qint32 | outOfViewRight (qint32 channel)=0 |
| virtual QString | positionToString (qreal pos) const =0 |
| virtual void | setSkipTransparent (bool set) |
| virtual void | setSkipUnselected (bool set) |
| virtual void | setView (qreal from, qreal width)=0 |
| virtual qreal | viewFrom () const =0 |
| virtual qreal | viewWidth () const =0 |
| virtual | ~KoHistogramProducer () |
Protected Attributes | |
| bool | m_skipTransparent |
| bool | m_skipUnselected |
This class is an interface used in the generation of a histogram. It is a container of data, all mathematically interesting things will calculated by an histogram.
The default view will be the entire range each color can be in. And don't let the numberOfBins return anything else then 256 unless you have a very good reason for it.
About the views: a view is a zoom combined with a start level: the entire range of a channel is 0.0 - 1.0: this is the position. Combined with a zoom, we can calculate what part of a channel will fall in a bin. This gives us an interface to that the views that is not dependent of the actual colorspace of the histogram. The 'size' value is the size, again from 0.0 to 1.0 of the displayed range.
For comfort of the GUI, and because it is logical, channels are accessed in the order in which they are found in the channels() method. This is potentially different from the order in which they are internally ordered!
Definition at line 38 of file KoHistogramProducer.h.
|
inline |
Definition at line 41 of file KoHistogramProducer.h.
|
inlinevirtual |
Definition at line 42 of file KoHistogramProducer.h.
|
pure virtual |
Adds the values from the specified array of pixels to the bins – does not reset anything.
| pixels | A pointer an array of pixeldata in the given colorspace |
| selectionMask | a pointer to an array of bytes, where 0 is unselected and 1-255 is degree of selectedness. The array must be just as long as the array of pixels. |
| nPixels | The number of pixels |
| colorSpace | the colorspace that can decode the pixel data. |
Implemented in KoBasicU8HistogramProducer, KoBasicU16HistogramProducer, KoBasicF32HistogramProducer, KoGenericRGBHistogramProducer, and KoGenericLabHistogramProducer.
|
pure virtual |
Implemented in KoBasicHistogramProducer, KoGenericRGBHistogramProducer, and KoGenericLabHistogramProducer.
|
pure virtual |
Clears the data in this producer, but keeps its other settings
Implemented in KoBasicHistogramProducer.
|
pure virtual |
Implemented in KoBasicHistogramProducer.
|
pure virtual |
|
pure virtual |
Implemented in KoBasicHistogramProducer.
|
pure virtual |
|
pure virtual |
Implemented in KoBasicHistogramProducer.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inlinevirtual |
Definition at line 63 of file KoHistogramProducer.h.
|
inlinevirtual |
Definition at line 66 of file KoHistogramProducer.h.
|
pure virtual |
Implemented in KoBasicHistogramProducer.
|
pure virtual |
Implemented in KoBasicHistogramProducer.
|
pure virtual |
Implemented in KoBasicHistogramProducer.
|
protected |
Definition at line 85 of file KoHistogramProducer.h.
|
protected |
Definition at line 86 of file KoHistogramProducer.h.