blob: f71d5054ca5ac1b54e4d1429fb4558f799284b32 (
plain)
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 | // Copyright (C) 2016 The Qt Company Ltd.// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only#ifndef QOPENGLPAINTDEVICE_H#define QOPENGLPAINTDEVICE_H#include <QtOpenGL/qtopenglglobal.h>#ifndef QT_NO_OPENGL#include <QtGui/qpaintdevice.h>#include <QtGui/qopengl.h>#include <QtGui/qopenglcontext.h> QT_BEGIN_NAMESPACE class QOpenGLPaintDevicePrivate;class Q_OPENGL_EXPORT QOpenGLPaintDevice :public QPaintDevice {Q_DECLARE_PRIVATE(QOpenGLPaintDevice)public:QOpenGLPaintDevice();explicitQOpenGLPaintDevice(const QSize &size);QOpenGLPaintDevice(int width,int height);~QOpenGLPaintDevice();intdevType()const override {returnQInternal::OpenGL; } QPaintEngine *paintEngine()const override; QOpenGLContext *context()const; QSize size()const;voidsetSize(const QSize &size);voidsetDevicePixelRatio(qreal devicePixelRatio); qreal dotsPerMeterX()const; qreal dotsPerMeterY()const;voidsetDotsPerMeterX(qreal);voidsetDotsPerMeterY(qreal);voidsetPaintFlipped(bool flipped);boolpaintFlipped()const;virtualvoidensureActiveTarget();protected:QOpenGLPaintDevice(QOpenGLPaintDevicePrivate &dd);intmetric(QPaintDevice::PaintDeviceMetric metric)const override;Q_DISABLE_COPY(QOpenGLPaintDevice) QScopedPointer<QOpenGLPaintDevicePrivate> d_ptr;}; QT_END_NAMESPACE #endif// QT_NO_OPENGL#endif// QOPENGLPAINTDEVICE_H
|