qsgtexture.sip 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // qsgtexture.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtQuick 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. class QSGTexture : public QObject
  22. {
  23. %TypeHeaderCode
  24. #include <qsgtexture.h>
  25. %End
  26. public:
  27. QSGTexture();
  28. virtual ~QSGTexture();
  29. enum WrapMode
  30. {
  31. Repeat,
  32. ClampToEdge,
  33. MirroredRepeat,
  34. };
  35. enum Filtering
  36. {
  37. None,
  38. Nearest,
  39. Linear,
  40. };
  41. virtual QSize textureSize() const = 0;
  42. virtual bool hasAlphaChannel() const = 0;
  43. virtual bool hasMipmaps() const = 0;
  44. virtual QRectF normalizedTextureSubRect() const;
  45. virtual bool isAtlasTexture() const;
  46. void setMipmapFiltering(QSGTexture::Filtering filter);
  47. QSGTexture::Filtering mipmapFiltering() const;
  48. void setFiltering(QSGTexture::Filtering filter);
  49. QSGTexture::Filtering filtering() const;
  50. void setHorizontalWrapMode(QSGTexture::WrapMode hwrap);
  51. QSGTexture::WrapMode horizontalWrapMode() const;
  52. void setVerticalWrapMode(QSGTexture::WrapMode vwrap);
  53. QSGTexture::WrapMode verticalWrapMode() const;
  54. QRectF convertToNormalizedSourceRect(const QRectF &rect) const;
  55. enum AnisotropyLevel
  56. {
  57. AnisotropyNone,
  58. Anisotropy2x,
  59. Anisotropy4x,
  60. Anisotropy8x,
  61. Anisotropy16x,
  62. };
  63. void setAnisotropyLevel(QSGTexture::AnisotropyLevel level);
  64. QSGTexture::AnisotropyLevel anisotropyLevel() const;
  65. virtual qint64 comparisonKey() const = 0;
  66. };
  67. class QSGDynamicTexture : public QSGTexture
  68. {
  69. %TypeHeaderCode
  70. #include <qsgtexture.h>
  71. %End
  72. public:
  73. QSGDynamicTexture();
  74. virtual bool updateTexture() = 0;
  75. %If (Qt_6_4_0 -)
  76. virtual ~QSGDynamicTexture();
  77. %End
  78. };