qpaintdevice.sip 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // qpaintdevice.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. class QPaintDevice
  22. {
  23. %TypeHeaderCode
  24. #include <qpaintdevice.h>
  25. %End
  26. public:
  27. enum PaintDeviceMetric
  28. {
  29. PdmWidth,
  30. PdmHeight,
  31. PdmWidthMM,
  32. PdmHeightMM,
  33. PdmNumColors,
  34. PdmDepth,
  35. PdmDpiX,
  36. PdmDpiY,
  37. PdmPhysicalDpiX,
  38. PdmPhysicalDpiY,
  39. PdmDevicePixelRatio,
  40. PdmDevicePixelRatioScaled,
  41. %If (Qt_6_8_0 -)
  42. PdmDevicePixelRatioF_EncodedA,
  43. %End
  44. %If (Qt_6_8_0 -)
  45. PdmDevicePixelRatioF_EncodedB,
  46. %End
  47. };
  48. virtual ~QPaintDevice();
  49. virtual QPaintEngine *paintEngine() const = 0;
  50. int width() const;
  51. int height() const;
  52. int widthMM() const;
  53. int heightMM() const;
  54. int logicalDpiX() const;
  55. int logicalDpiY() const;
  56. int physicalDpiX() const;
  57. int physicalDpiY() const;
  58. int depth() const;
  59. bool paintingActive() const;
  60. int colorCount() const;
  61. qreal devicePixelRatio() const;
  62. protected:
  63. QPaintDevice();
  64. virtual int metric(QPaintDevice::PaintDeviceMetric metric) const;
  65. public:
  66. qreal devicePixelRatioF() const;
  67. static qreal devicePixelRatioFScale();
  68. private:
  69. QPaintDevice(const QPaintDevice &);
  70. };