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