Krita Source Code Documentation
Loading...
Searching...
No Matches
KisGLImageF16.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KISGLIMAGEF16_H
8#define KISGLIMAGEF16_H
9
10#include <QSharedDataPointer>
11#include <half.h>
12#include <boost/operators.hpp>
13
14class QSize;
15
16class KisGLImageF16 : public boost::equality_comparable<KisGLImageF16>
17{
18public:
20 KisGLImageF16(const QSize &size, bool clearPixels = false);
21 KisGLImageF16(int width, int height, bool clearPixels = false);
22 KisGLImageF16(const KisGLImageF16 &rhs);
24
25 friend bool operator==(const KisGLImageF16 &lhs, const KisGLImageF16 &rhs);
26
28
29 void clearPixels();
30 void resize(const QSize &size, bool clearPixels = false);
31
32 const half* constData() const;
33 half* data();
34
35 QSize size() const;
36 int width() const;
37 int height() const;
38
39 bool isNull() const;
40
41private:
42 struct Private;
43 QSharedDataPointer<Private> m_d;
44};
45
46#endif // KISGLIMAGEF16_H
int height() const
void resize(const QSize &size, bool clearPixels=false)
QSize size() const
friend bool operator==(const KisGLImageF16 &lhs, const KisGLImageF16 &rhs)
bool isNull() const
QSharedDataPointer< Private > m_d
KisGLImageF16 & operator=(const KisGLImageF16 &rhs)
const half * constData() const
int width() const