Qt
6.x
The Qt SDK
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Symbols
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
4
#include "
qwindowsdirect2dpaintdevice.h
"
5
#include "
qwindowsdirect2dpaintengine.h
"
6
#include "
qwindowsdirect2dcontext.h
"
7
#include "
qwindowsdirect2dhelpers.h
"
8
#include "
qwindowsdirect2dbitmap.h
"
9
#include "
qwindowsdirect2ddevicecontext.h
"
10
11
#include "
qwindowswindow.h
"
12
13
QT_BEGIN_NAMESPACE
14
15
class
QWindowsDirect2DPaintDevicePrivate
16
{
17
public
:
18
QWindowsDirect2DPaintDevicePrivate
(
QWindowsDirect2DBitmap
*
bitmap
,
QInternal::PaintDeviceFlags
f
,
19
QWindowsDirect2DPaintEngine::Flags
paintFlags)
20
:
engine
(new
QWindowsDirect2DPaintEngine
(
bitmap
, paintFlags))
21
,
bitmap
(
bitmap
)
22
,
flags
(
f
)
23
{}
24
25
QScopedPointer<QWindowsDirect2DPaintEngine>
engine
;
26
QWindowsDirect2DBitmap
*
bitmap
;
27
QInternal::PaintDeviceFlags
flags
;
28
};
29
30
QWindowsDirect2DPaintDevice::QWindowsDirect2DPaintDevice
(
QWindowsDirect2DBitmap
*
bitmap
,
QInternal::PaintDeviceFlags
flags
,
31
QWindowsDirect2DPaintEngine::Flags
paintFlags)
32
: d_ptr(new
QWindowsDirect2DPaintDevicePrivate
(
bitmap
,
flags
, paintFlags))
33
{
34
}
35
36
QWindowsDirect2DPaintDevice::~QWindowsDirect2DPaintDevice
()
37
{
38
}
39
40
QPaintEngine
*
QWindowsDirect2DPaintDevice::paintEngine
()
const
41
{
42
Q_D(
const
QWindowsDirect2DPaintDevice
);
43
44
return
d
->engine.data();
45
}
46
47
int
QWindowsDirect2DPaintDevice::devType
()
const
48
{
49
Q_D(
const
QWindowsDirect2DPaintDevice
);
50
51
return
d
->flags;
52
}
53
54
int
QWindowsDirect2DPaintDevice::metric
(
QPaintDevice::PaintDeviceMetric
metric)
const
55
{
56
Q_D(
const
QWindowsDirect2DPaintDevice
);
57
58
switch
(
metric
) {
59
case
QPaintDevice::PdmWidth
:
60
return
int(
d
->bitmap->bitmap()->GetPixelSize().width);
61
case
QPaintDevice::PdmHeight
:
62
return
int(
d
->bitmap->bitmap()->GetPixelSize().height);
63
case
QPaintDevice::PdmNumColors
:
64
return
INT_MAX;
65
case
QPaintDevice::PdmDepth
:
66
return
32;
67
case
QPaintDevice::PdmDpiX
:
68
case
QPaintDevice::PdmPhysicalDpiX
:
69
{
70
QT_WARNING_PUSH
71
QT_WARNING_DISABLE_DEPRECATED
// See QTBUG-94043
72
FLOAT
x
,
y
;
73
QWindowsDirect2DContext::instance
()->
d2dFactory
()->GetDesktopDpi(&
x
, &
y
);
74
return
qRound
(
x
);
75
}
76
case
QPaintDevice::PdmDpiY
:
77
case
QPaintDevice::PdmPhysicalDpiY
:
78
{
79
FLOAT
x
,
y
;
80
QWindowsDirect2DContext::instance
()->
d2dFactory
()->GetDesktopDpi(&
x
, &
y
);
81
return
qRound
(
y
);
82
QT_WARNING_POP
83
}
84
case
QPaintDevice::PdmDevicePixelRatio
:
85
return
1;
86
case
QPaintDevice::PdmDevicePixelRatioScaled
:
87
return
qRound
(
devicePixelRatioFScale
());
88
case
QPaintDevice::PdmWidthMM
:
89
case
QPaintDevice::PdmHeightMM
:
90
break
;
91
}
92
93
return
-1;
94
}
95
96
QT_END_NAMESPACE
QInternal::PaintDeviceFlags
PaintDeviceFlags
Definition
qnamespace.h:1821
QPaintDevice::PaintDeviceMetric
PaintDeviceMetric
Definition
qpaintdevice.h:20
QPaintDevice::PdmDpiX
@ PdmDpiX
Definition
qpaintdevice.h:27
QPaintDevice::PdmDepth
@ PdmDepth
Definition
qpaintdevice.h:26
QPaintDevice::PdmNumColors
@ PdmNumColors
Definition
qpaintdevice.h:25
QPaintDevice::PdmDpiY
@ PdmDpiY
Definition
qpaintdevice.h:28
QPaintDevice::PdmPhysicalDpiX
@ PdmPhysicalDpiX
Definition
qpaintdevice.h:29
QPaintDevice::PdmPhysicalDpiY
@ PdmPhysicalDpiY
Definition
qpaintdevice.h:30
QPaintDevice::PdmWidth
@ PdmWidth
Definition
qpaintdevice.h:21
QPaintDevice::PdmDevicePixelRatioScaled
@ PdmDevicePixelRatioScaled
Definition
qpaintdevice.h:32
QPaintDevice::PdmHeightMM
@ PdmHeightMM
Definition
qpaintdevice.h:24
QPaintDevice::PdmDevicePixelRatio
@ PdmDevicePixelRatio
Definition
qpaintdevice.h:31
QPaintDevice::PdmWidthMM
@ PdmWidthMM
Definition
qpaintdevice.h:23
QPaintDevice::PdmHeight
@ PdmHeight
Definition
qpaintdevice.h:22
QPaintDevice::devicePixelRatioFScale
static qreal devicePixelRatioFScale()
Definition
qpaintdevice.h:54
QPaintEngineEx::Flags
Flags
Definition
qpaintengineex_p.h:114
QPaintEngine
\inmodule QtGui
Definition
qpaintengine.h:51
QScopedPointer
\inmodule QtCore
Definition
qscopedpointer.h:71
QWindowsDirect2DBitmap
Definition
qwindowsdirect2dbitmap.h:24
QWindowsDirect2DContext::d2dFactory
ID2D1Factory1 * d2dFactory() const
Definition
qwindowsdirect2dcontext.cpp:154
QWindowsDirect2DContext::instance
static QWindowsDirect2DContext * instance()
Definition
qwindowsdirect2dcontext.cpp:137
QWindowsDirect2DPaintDevicePrivate
Definition
qwindowsdirect2dpaintdevice.cpp:16
QWindowsDirect2DPaintDevicePrivate::QWindowsDirect2DPaintDevicePrivate
QWindowsDirect2DPaintDevicePrivate(QWindowsDirect2DBitmap *bitmap, QInternal::PaintDeviceFlags f, QWindowsDirect2DPaintEngine::Flags paintFlags)
Definition
qwindowsdirect2dpaintdevice.cpp:18
QWindowsDirect2DPaintDevicePrivate::flags
QInternal::PaintDeviceFlags flags
Definition
qwindowsdirect2dpaintdevice.cpp:27
QWindowsDirect2DPaintDevicePrivate::engine
QScopedPointer< QWindowsDirect2DPaintEngine > engine
Definition
qwindowsdirect2dpaintdevice.cpp:25
QWindowsDirect2DPaintDevicePrivate::bitmap
QWindowsDirect2DBitmap * bitmap
Definition
qwindowsdirect2dpaintdevice.cpp:26
QWindowsDirect2DPaintDevice
Definition
qwindowsdirect2dpaintdevice.h:17
QWindowsDirect2DPaintDevice::paintEngine
QPaintEngine * paintEngine() const override
Definition
qwindowsdirect2dpaintdevice.cpp:40
QWindowsDirect2DPaintDevice::~QWindowsDirect2DPaintDevice
~QWindowsDirect2DPaintDevice()
Definition
qwindowsdirect2dpaintdevice.cpp:36
QWindowsDirect2DPaintDevice::devType
int devType() const override
Definition
qwindowsdirect2dpaintdevice.cpp:47
QWindowsDirect2DPaintDevice::metric
int metric(PaintDeviceMetric metric) const override
Definition
qwindowsdirect2dpaintdevice.cpp:54
QWindowsDirect2DPaintDevice::QWindowsDirect2DPaintDevice
QWindowsDirect2DPaintDevice(QWindowsDirect2DBitmap *bitmap, QInternal::PaintDeviceFlags flags, QWindowsDirect2DPaintEngine::Flags paintFlags=QWindowsDirect2DPaintEngine::NoFlag)
Definition
qwindowsdirect2dpaintdevice.cpp:30
QWindowsDirect2DPaintEngine
Definition
qwindowsdirect2dpaintengine.h:18
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
QT_WARNING_POP
#define QT_WARNING_POP
Definition
qcompilerdetection.h:1158
QT_WARNING_DISABLE_DEPRECATED
#define QT_WARNING_DISABLE_DEPRECATED
Definition
qcompilerdetection.h:1163
QT_WARNING_PUSH
#define QT_WARNING_PUSH
Definition
qcompilerdetection.h:1157
qRound
int qRound(qfloat16 d) noexcept
Definition
qfloat16.h:281
x
GLint GLint GLint GLint GLint x
[0]
Definition
qopengles2ext.h:605
f
GLfloat GLfloat f
Definition
qopengles2ext.h:795
flags
GLbitfield flags
Definition
qopengles2ext.h:1026
y
GLint y
Definition
qopengles2ext.h:206
bitmap
GLsizei GLfixed GLfixed GLfixed GLfixed const GLubyte * bitmap
Definition
qopenglext.h:5182
qwindowsdirect2dbitmap.h
qwindowsdirect2dcontext.h
qwindowsdirect2ddevicecontext.h
qwindowsdirect2dhelpers.h
qwindowsdirect2dpaintdevice.h
qwindowsdirect2dpaintengine.h
qwindowswindow.h
d
double d
Definition
src_corelib_text_qlocale.cpp:9
qtbase
src
plugins
platforms
direct2d
qwindowsdirect2dpaintdevice.cpp
Generated by
1.9.7