Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qopenglpaintdevice.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOPENGLPAINTDEVICE_H
5#define QOPENGLPAINTDEVICE_H
6
7#include <QtOpenGL/qtopenglglobal.h>
8
9#ifndef QT_NO_OPENGL
10
11#include <QtGui/qpaintdevice.h>
12#include <QtGui/qopengl.h>
13#include <QtGui/qopenglcontext.h>
14
16
18
19class Q_OPENGL_EXPORT QOpenGLPaintDevice : public QPaintDevice
20{
21 Q_DECLARE_PRIVATE(QOpenGLPaintDevice)
22public:
24 explicit QOpenGLPaintDevice(const QSize &size);
27
28 int devType() const override { return QInternal::OpenGL; }
29 QPaintEngine *paintEngine() const override;
30
31 QOpenGLContext *context() const;
32 QSize size() const;
33 void setSize(const QSize &size);
34 void setDevicePixelRatio(qreal devicePixelRatio);
35
36 qreal dotsPerMeterX() const;
37 qreal dotsPerMeterY() const;
38
39 void setDotsPerMeterX(qreal);
40 void setDotsPerMeterY(qreal);
41
42 void setPaintFlipped(bool flipped);
43 bool paintFlipped() const;
44
45 virtual void ensureActiveTarget();
46
47protected:
49 int metric(QPaintDevice::PaintDeviceMetric metric) const override;
50
51 Q_DISABLE_COPY(QOpenGLPaintDevice)
53};
54
56
57#endif // QT_NO_OPENGL
58
59#endif // QOPENGLPAINTDEVICE_H
\inmodule QtGui
The QOpenGLPaintDevice class enables painting to an OpenGL context using QPainter.
int devType() const override
\inmodule QtGui
\inmodule QtCore
\inmodule QtCore
Definition qsize.h:25
Combined button and popup list for selecting options.
static void * context
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei width
double qreal
Definition qtypes.h:187