File indexing completed on 2024-12-22 04:14:56
0001 /* 0002 * SPDX-FileCopyrightText: 2019 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KISGLIMAGEF16_H 0008 #define KISGLIMAGEF16_H 0009 0010 #include <QSharedDataPointer> 0011 #include <half.h> 0012 #include <boost/operators.hpp> 0013 0014 class QSize; 0015 0016 class KisGLImageF16 : public boost::equality_comparable<KisGLImageF16> 0017 { 0018 public: 0019 KisGLImageF16(); 0020 KisGLImageF16(const QSize &size, bool clearPixels = false); 0021 KisGLImageF16(int width, int height, bool clearPixels = false); 0022 KisGLImageF16(const KisGLImageF16 &rhs); 0023 KisGLImageF16& operator=(const KisGLImageF16 &rhs); 0024 0025 friend bool operator==(const KisGLImageF16 &lhs, const KisGLImageF16 &rhs); 0026 0027 ~KisGLImageF16(); 0028 0029 void clearPixels(); 0030 void resize(const QSize &size, bool clearPixels = false); 0031 0032 const half* constData() const; 0033 half* data(); 0034 0035 QSize size() const; 0036 int width() const; 0037 int height() const; 0038 0039 bool isNull() const; 0040 0041 private: 0042 struct Private; 0043 QSharedDataPointer<Private> m_d; 0044 }; 0045 0046 #endif // KISGLIMAGEF16_H