qpixelformat.sip 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. // qpixelformat.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtGui Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  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. %ModuleCode
  22. #include <qpixelformat.h>
  23. %End
  24. class QPixelFormat
  25. {
  26. %TypeHeaderCode
  27. #include <qpixelformat.h>
  28. %End
  29. public:
  30. enum ColorModel
  31. {
  32. RGB,
  33. BGR,
  34. Indexed,
  35. Grayscale,
  36. CMYK,
  37. HSL,
  38. HSV,
  39. YUV,
  40. Alpha,
  41. };
  42. enum AlphaUsage
  43. {
  44. UsesAlpha,
  45. IgnoresAlpha,
  46. };
  47. enum AlphaPosition
  48. {
  49. AtBeginning,
  50. AtEnd,
  51. };
  52. enum AlphaPremultiplied
  53. {
  54. NotPremultiplied,
  55. Premultiplied,
  56. };
  57. enum TypeInterpretation
  58. {
  59. UnsignedInteger,
  60. UnsignedShort,
  61. UnsignedByte,
  62. FloatingPoint,
  63. };
  64. enum YUVLayout
  65. {
  66. YUV444,
  67. YUV422,
  68. YUV411,
  69. YUV420P,
  70. YUV420SP,
  71. YV12,
  72. UYVY,
  73. YUYV,
  74. NV12,
  75. NV21,
  76. IMC1,
  77. IMC2,
  78. IMC3,
  79. IMC4,
  80. Y8,
  81. Y16,
  82. };
  83. enum ByteOrder
  84. {
  85. LittleEndian,
  86. BigEndian,
  87. CurrentSystemEndian,
  88. };
  89. QPixelFormat();
  90. 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);
  91. QPixelFormat::ColorModel colorModel() const;
  92. uchar channelCount() const /PyInt/;
  93. uchar redSize() const /PyInt/;
  94. uchar greenSize() const /PyInt/;
  95. uchar blueSize() const /PyInt/;
  96. uchar cyanSize() const /PyInt/;
  97. uchar magentaSize() const /PyInt/;
  98. uchar yellowSize() const /PyInt/;
  99. uchar blackSize() const /PyInt/;
  100. uchar hueSize() const /PyInt/;
  101. uchar saturationSize() const /PyInt/;
  102. uchar lightnessSize() const /PyInt/;
  103. uchar brightnessSize() const /PyInt/;
  104. uchar alphaSize() const /PyInt/;
  105. uchar bitsPerPixel() const /PyInt/;
  106. QPixelFormat::AlphaUsage alphaUsage() const;
  107. QPixelFormat::AlphaPosition alphaPosition() const;
  108. QPixelFormat::AlphaPremultiplied premultiplied() const;
  109. QPixelFormat::TypeInterpretation typeInterpretation() const;
  110. QPixelFormat::ByteOrder byteOrder() const;
  111. QPixelFormat::YUVLayout yuvLayout() const;
  112. uchar subEnum() const /PyInt/;
  113. };
  114. bool operator==(QPixelFormat fmt1, QPixelFormat fmt2);
  115. bool operator!=(QPixelFormat fmt1, QPixelFormat fmt2);
  116. QPixelFormat 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);
  117. QPixelFormat qPixelFormatGrayscale(uchar channelSize /PyInt/, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::UnsignedInteger);
  118. QPixelFormat qPixelFormatCmyk(uchar channelSize /PyInt/, uchar alphaSize /PyInt/ = 0, QPixelFormat::AlphaUsage alphaUsage = QPixelFormat::IgnoresAlpha, QPixelFormat::AlphaPosition alphaPosition = QPixelFormat::AtBeginning, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::UnsignedInteger);
  119. QPixelFormat qPixelFormatHsl(uchar channelSize /PyInt/, uchar alphaSize /PyInt/ = 0, QPixelFormat::AlphaUsage alphaUsage = QPixelFormat::IgnoresAlpha, QPixelFormat::AlphaPosition alphaPosition = QPixelFormat::AtBeginning, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::FloatingPoint);
  120. QPixelFormat qPixelFormatHsv(uchar channelSize /PyInt/, uchar alphaSize /PyInt/ = 0, QPixelFormat::AlphaUsage alphaUsage = QPixelFormat::IgnoresAlpha, QPixelFormat::AlphaPosition alphaPosition = QPixelFormat::AtBeginning, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::FloatingPoint);
  121. QPixelFormat 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);
  122. QPixelFormat qPixelFormatAlpha(uchar channelSize /PyInt/, QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::UnsignedInteger);