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
qwindowsdirect2dpaintdevice.cpp
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
10
11#include "qwindowswindow.h"
12
14
29
35
39
41{
43
44 return d->engine.data();
45}
46
48{
50
51 return d->flags;
52}
53
55{
57
58 switch (metric) {
60 return int(d->bitmap->bitmap()->GetPixelSize().width);
62 return int(d->bitmap->bitmap()->GetPixelSize().height);
64 return INT_MAX;
66 return 32;
69 {
71QT_WARNING_DISABLE_DEPRECATED // See QTBUG-94043
72 FLOAT x, y;
73 QWindowsDirect2DContext::instance()->d2dFactory()->GetDesktopDpi(&x, &y);
74 return qRound(x);
75 }
78 {
79 FLOAT x, y;
80 QWindowsDirect2DContext::instance()->d2dFactory()->GetDesktopDpi(&x, &y);
81 return qRound(y);
83 }
85 return 1;
90 break;
91 }
92
93 return -1;
94}
95
@ PdmDevicePixelRatioScaled
static qreal devicePixelRatioFScale()
\inmodule QtGui
static QWindowsDirect2DContext * instance()
QWindowsDirect2DPaintDevicePrivate(QWindowsDirect2DBitmap *bitmap, QInternal::PaintDeviceFlags f, QWindowsDirect2DPaintEngine::Flags paintFlags)
QScopedPointer< QWindowsDirect2DPaintEngine > engine
QPaintEngine * paintEngine() const override
int metric(PaintDeviceMetric metric) const override
QWindowsDirect2DPaintDevice(QWindowsDirect2DBitmap *bitmap, QInternal::PaintDeviceFlags flags, QWindowsDirect2DPaintEngine::Flags paintFlags=QWindowsDirect2DPaintEngine::NoFlag)
Combined button and popup list for selecting options.
#define QT_WARNING_POP
#define QT_WARNING_DISABLE_DEPRECATED
#define QT_WARNING_PUSH
int qRound(qfloat16 d) noexcept
Definition qfloat16.h:327
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat f
GLbitfield flags
GLint y
GLsizei GLfixed GLfixed GLfixed GLfixed const GLubyte * bitmap