1// qpixelformat.sip generated by MetaSIP 2// 3// This file is part of the QtGui Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23%If (Qt_5_4_0 -) 24%ModuleCode 25#include <qpixelformat.h> 26%End 27%End 28 29%If (Qt_5_4_0 -) 30 31class QPixelFormat 32{ 33%TypeHeaderCode 34#include <qpixelformat.h> 35%End 36 37public: 38 enum ColorModel 39 { 40 RGB, 41 BGR, 42 Indexed, 43 Grayscale, 44 CMYK, 45 HSL, 46 HSV, 47 YUV, 48%If (Qt_5_5_0 -) 49 Alpha, 50%End 51 }; 52 53 enum AlphaUsage 54 { 55 UsesAlpha, 56 IgnoresAlpha, 57 }; 58 59 enum AlphaPosition 60 { 61 AtBeginning, 62 AtEnd, 63 }; 64 65 enum AlphaPremultiplied 66 { 67 NotPremultiplied, 68 Premultiplied, 69 }; 70 71 enum TypeInterpretation 72 { 73 UnsignedInteger, 74 UnsignedShort, 75 UnsignedByte, 76 FloatingPoint, 77 }; 78 79 enum YUVLayout 80 { 81 YUV444, 82 YUV422, 83 YUV411, 84 YUV420P, 85 YUV420SP, 86 YV12, 87 UYVY, 88 YUYV, 89 NV12, 90 NV21, 91 IMC1, 92 IMC2, 93 IMC3, 94 IMC4, 95 Y8, 96 Y16, 97 }; 98 99 enum ByteOrder 100 { 101 LittleEndian, 102 BigEndian, 103 CurrentSystemEndian, 104 }; 105 106 QPixelFormat(); 107 QPixelFormat(QPixelFormat::ColorModel mdl, uchar firstSize /PyInt/, uchar secondSize /PyInt/, uchar thirdSize /PyInt/, uchar fourthSize /PyInt/, uchar fifthSize /PyInt/, uchar alfa /PyInt/, QPixelFormat::AlphaUsage usage, QPixelFormat::AlphaPosition position, QPixelFormat::AlphaPremultiplied premult, QPixelFormat::TypeInterpretation typeInterp, QPixelFormat::ByteOrder byteOrder = QPixelFormat::CurrentSystemEndian, uchar subEnum /PyInt/ = 0); 108 QPixelFormat::ColorModel colorModel() const; 109 uchar channelCount() const /PyInt/; 110 uchar redSize() const /PyInt/; 111 uchar greenSize() const /PyInt/; 112 uchar blueSize() const /PyInt/; 113 uchar cyanSize() const /PyInt/; 114 uchar magentaSize() const /PyInt/; 115 uchar yellowSize() const /PyInt/; 116 uchar blackSize() const /PyInt/; 117 uchar hueSize() const /PyInt/; 118 uchar saturationSize() const /PyInt/; 119 uchar lightnessSize() const /PyInt/; 120 uchar brightnessSize() const /PyInt/; 121 uchar alphaSize() const /PyInt/; 122 uchar bitsPerPixel() const /PyInt/; 123 QPixelFormat::AlphaUsage alphaUsage() const; 124 QPixelFormat::AlphaPosition alphaPosition() const; 125 QPixelFormat::AlphaPremultiplied premultiplied() const; 126 QPixelFormat::TypeInterpretation typeInterpretation() const; 127 QPixelFormat::ByteOrder byteOrder() const; 128 QPixelFormat::YUVLayout yuvLayout() const; 129 uchar subEnum() const /PyInt/; 130}; 131 132%End 133%If (Qt_5_4_0 -) 134bool operator==(QPixelFormat fmt1, QPixelFormat fmt2); 135%End 136%If (Qt_5_4_0 -) 137bool operator!=(QPixelFormat fmt1, QPixelFormat fmt2); 138%End 139%If (Qt_5_4_0 -) 140QPixelFormat qPixelFormatRgba(uchar red /PyInt/, uchar green /PyInt/, uchar blue /PyInt/, uchar alfa /PyInt/, QPixelFormat::AlphaUsage usage, QPixelFormat::AlphaPosition position, QPixelFormat::AlphaPremultiplied premultiplied = QPixelFormat::NotPremultiplied, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::UnsignedInteger); 141%End 142%If (Qt_5_4_0 -) 143QPixelFormat qPixelFormatGrayscale(uchar channelSize /PyInt/, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::UnsignedInteger); 144%End 145%If (Qt_5_4_0 -) 146QPixelFormat qPixelFormatCmyk(uchar channelSize /PyInt/, uchar alphaSize /PyInt/ = 0, QPixelFormat::AlphaUsage alphaUsage = QPixelFormat::IgnoresAlpha, QPixelFormat::AlphaPosition alphaPosition = QPixelFormat::AtBeginning, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::UnsignedInteger); 147%End 148%If (Qt_5_4_0 -) 149QPixelFormat qPixelFormatHsl(uchar channelSize /PyInt/, uchar alphaSize /PyInt/ = 0, QPixelFormat::AlphaUsage alphaUsage = QPixelFormat::IgnoresAlpha, QPixelFormat::AlphaPosition alphaPosition = QPixelFormat::AtBeginning, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::FloatingPoint); 150%End 151%If (Qt_5_4_0 -) 152QPixelFormat qPixelFormatHsv(uchar channelSize /PyInt/, uchar alphaSize /PyInt/ = 0, QPixelFormat::AlphaUsage alphaUsage = QPixelFormat::IgnoresAlpha, QPixelFormat::AlphaPosition alphaPosition = QPixelFormat::AtBeginning, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::FloatingPoint); 153%End 154%If (Qt_5_4_0 -) 155QPixelFormat qPixelFormatYuv(QPixelFormat::YUVLayout layout, uchar alphaSize /PyInt/ = 0, QPixelFormat::AlphaUsage alphaUsage = QPixelFormat::IgnoresAlpha, QPixelFormat::AlphaPosition alphaPosition = QPixelFormat::AtBeginning, QPixelFormat::AlphaPremultiplied premultiplied = QPixelFormat::NotPremultiplied, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::UnsignedByte, QPixelFormat::ByteOrder byteOrder = QPixelFormat::LittleEndian); 156%End 157%If (Qt_5_5_0 -) 158QPixelFormat qPixelFormatAlpha(uchar channelSize /PyInt/, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::UnsignedInteger); 159%End 160