Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qcolormap.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\class QColormap
6
\ingroup painting
7
\inmodule QtWidgets
8
\deprecated [6.11]
9
10
\brief The QColormap class maps device independent QColors to device
11
dependent pixel values.
12
*/
13
14
/*! \enum QColormap::Mode
15
16
This enum describes how QColormap maps device independent RGB
17
values to device dependent pixel values.
18
19
\value Direct Pixel values are derived directly from the RGB
20
values, also known as "True Color."
21
22
\value Indexed Pixel values represent indexes into a list of
23
available colors, i.e. QColormap uses the index of the color that
24
most closely matches an RGB value.
25
26
\value Gray Similar to \c Indexed, pixel values represent a list
27
of available gray tones. QColormap uses the index of the gray
28
tone that most closely matches the computed gray tone of an RGB
29
value.
30
*/
31
32
/*!
33
\fn QColormap QColormap::instance(int screen)
34
35
Returns the colormap for the specified \a screen. If \a screen is
36
-1, this function returns the colormap for the default screen.
37
*/
38
39
/*!
40
\fn QColormap::QColormap(const QColormap &colormap)
41
42
Constructs a copy of another \a colormap.
43
*/
44
45
/*!
46
\fn QColormap::~QColormap()
47
48
Destroys the colormap.
49
*/
50
51
/*!
52
\fn int QColormap::size() const
53
54
Returns the size of the colormap for \c Indexed and \c Gray modes;
55
Returns -1 for \c Direct mode.
56
57
\sa colormap()
58
*/
59
60
/*!
61
\fn uint QColormap::pixel(const QColor &color) const
62
63
Returns a device dependent pixel value for the \a color.
64
65
\sa colorAt()
66
*/
67
68
/*!
69
\fn int QColormap::depth() const
70
71
Returns the depth of the device.
72
73
\sa size()
74
*/
75
76
/*!
77
\fn QColormap::Mode QColormap::mode() const
78
79
Returns the mode of this colormap.
80
81
\sa QColormap::Mode
82
*/
83
84
/*!
85
\fn const QColor QColormap::colorAt(uint pixel) const
86
87
Returns a QColor for the \a pixel.
88
89
\sa pixel()
90
*/
91
92
/*!
93
\fn const QList<QColor> QColormap::colormap() const
94
95
Returns a list of colors which represents the devices colormap
96
for \c Indexed and \c Gray modes. This function returns an empty
97
list for \c Direct mode.
98
99
\sa size()
100
*/
101
102
/*! \since 4.2
103
104
\fn QColormap &QColormap::operator=(const QColormap &colormap)
105
106
Assigns the given \a colormap to \e this color map and returns
107
a reference to \e this color map.
108
*/
109
110
/*!
111
\fn void QColormap::initialize()
112
\internal
113
*/
114
115
/*!
116
\fn void QColormap::cleanup()
117
\internal
118
*/
qtbase
src
widgets
util
qcolormap.qdoc
Generated on
for Qt by
1.14.0