Krita Source Code Documentation
Loading...
Searching...
No Matches
KisHistogramPainter.h
Go to the documentation of this file.
1/*
2 * This file is part of Krita
3 *
4 * SPDX-FileCopyrightText: 2021 Deif Lou <ginoba@gmail.com>
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#ifndef KIS_HISTOGRAM_PAINTER_H
10#define KIS_HISTOGRAM_PAINTER_H
11
12#include <QScopedPointer>
13#include <QPainter>
14#include <QVector>
15#include <QRect>
16
17#include "kritaui_export.h"
18
19class KisHistogram;
20class KoColorSpace;
21
27class KRITAUI_EXPORT KisHistogramPainter
28{
29public:
32
49 void setup(KisHistogram *histogram, const KoColorSpace *colorSpace, QVector<int> channels = {});
50
55 QImage paint(const QSize &imageSize);
60 QImage paint(int w, int h);
65 void paint(QPainter &painter, const QRect &rect);
72 int totalNumberOfAvailableChannels() const;
78 QList<int> availableChannels() const;
85 const QVector<int>& channels() const;
91 void setChannel(int channel);
97 void setChannels(const QVector<int> &channels);
106 QColor defaultColor() const;
112 void setDefaultColor(const QColor &newDefaultColor);
121 qreal scale() const;
128 void setScale(qreal newScale);
135 void setScaleToFit();
147 void setScaleToCutLongPeaks();
154 bool isLogarithmic() const;
161 void setLogarithmic(bool logarithmic);
162
163private:
164 class Private;
165 QScopedPointer<Private> m_d;
166};
167
168#endif
A class that can render different KisHistograms. It renders a somewhat smooth shape (with different c...
QScopedPointer< Private > m_d