kis_display_filter.h 1.83 KB
Newer Older
1
/*
2
 *  Copyright (c) 2012 Boudewijn Rempt <boud@valdyas.org>
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
#ifndef KIS_DISPLAY_FILTER_H
#define KIS_DISPLAY_FILTER_H

#include <QObject>

23
#include <QSharedPointer>
24
#include <qopengl.h>
25

26
#include <opengl/kis_opengl.h>
27
#include <kritaui_export.h>
28

29
class KisExposureGammaCorrectionInterface;
30

31
/**
32 33
 * @brief The KisDisplayFilter class is the base class for filters that
 * are applied by the canvas to the projection before displaying.
34
 */
35
class KRITAUI_EXPORT KisDisplayFilter : public QObject
36 37 38 39 40
{
    Q_OBJECT
public:
    explicit KisDisplayFilter(QObject *parent = 0);

41
#ifdef HAVE_OPENGL
42 43
    virtual QString program() const = 0;
    virtual GLuint lutTexture() const = 0;
44
#endif
45
    virtual void filter(quint8 *pixels, quint32 numPixels) = 0;
46 47
    virtual void approximateInverseTransformation(quint8 *pixels, quint32 numPixels) = 0;
    virtual void approximateForwardTransformation(quint8 *pixels, quint32 numPixels) = 0;
48
    virtual bool useInternalColorManagement() const = 0;
49
    virtual KisExposureGammaCorrectionInterface *correctionInterface() const = 0;
50
    virtual bool lockCurrentColorVisualRepresentation() const = 0;
51 52 53 54
};


#endif