8#include <private/qopenglpaintdevice_p.h>
9#include <private/qobject_p.h>
10#include <private/qopenglcontext_p.h>
11#include <private/qopenglframebufferobject_p.h>
12#include <private/qopenglpaintengine_p.h>
15#include <private/qfont_p.h>
136 , devicePixelRatio(1.0)
169 return d_ptr->engine;
172 if (
engine->isActive() &&
engine->paintDevice() !=
this) {
174 return d_ptr->engine;
252 qWarning(
"QOpenGLPaintDevice::metric() - metric %d not known",
metric);
QOpenGLPaintDevicePrivate(const QSize &size)
virtual ~QOpenGLPaintDevicePrivate()
The QOpenGLPaintDevice class enables painting to an OpenGL context using QPainter.
QScopedPointer< QOpenGLPaintDevicePrivate > d_ptr
void setDotsPerMeterX(qreal)
Sets the number of pixels per meter horizontally to dpmx.
bool paintFlipped() const
Returns true if painting is flipped around the Y-axis.
int metric(QPaintDevice::PaintDeviceMetric metric) const override
\reimp
void setDotsPerMeterY(qreal)
Sets the number of pixels per meter vertically to dpmy.
qreal dotsPerMeterX() const
Returns the number of pixels per meter horizontally.
QOpenGLPaintDevice()
Constructs a QOpenGLPaintDevice.
void setPaintFlipped(bool flipped)
Sets whether painting should be flipped around the Y-axis or not to flipped.
QOpenGLContext * context() const
Returns the OpenGL context associated with the paint device.
void setDevicePixelRatio(qreal devicePixelRatio)
Sets the device pixel ratio for the paint device to devicePixelRatio.
qreal dotsPerMeterY() const
Returns the number of pixels per meter vertically.
void setSize(const QSize &size)
Sets the pixel size of the paint device to size.
~QOpenGLPaintDevice()
Destroys the QOpenGLPaintDevice.
virtual void ensureActiveTarget()
This virtual method is provided as a callback to allow re-binding a target frame buffer object or con...
QSize size() const
Returns the pixel size of the paint device.
qreal devicePixelRatio() const
@ PdmDevicePixelRatioScaled
static qreal devicePixelRatioFScale()
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
T & localData()
Returns a reference to the data that was set by the calling thread.
Combined button and popup list for selecting options.
int qRound(qfloat16 d) noexcept
Q_GUI_EXPORT int qt_defaultDpiX()
Q_GUI_EXPORT int qt_defaultDpiY()
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]