summaryrefslogtreecommitdiffstats
path: root/src/widgets/util/qcolormap.qdoc
blob: d976a369f07b19e856d44286112f27e21d58319b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \class QColormap
    \ingroup painting
    \inmodule QtWidgets

    \brief The QColormap class maps device independent QColors to device
    dependent pixel values.
*/

/*! \enum QColormap::Mode

    This enum describes how QColormap maps device independent RGB
    values to device dependent pixel values.

    \value Direct Pixel values are derived directly from the RGB
    values, also known as "True Color."

    \value Indexed Pixel values represent indexes into a list of
    available colors, i.e. QColormap uses the index of the color that
    most closely matches an RGB value.

    \value Gray Similar to \c Indexed, pixel values represent a list
    of available gray tones.  QColormap uses the index of the gray
    tone that most closely matches the computed gray tone of an RGB
    value.
*/

/*!
    \fn QColormap QColormap::instance(int screen)

    Returns the colormap for the specified \a screen.  If \a screen is
    -1, this function returns the colormap for the default screen.
*/

/*!
    \fn QColormap::QColormap(const QColormap &colormap)

    Constructs a copy of another \a colormap.
*/

/*!
    \fn QColormap::~QColormap()

    Destroys the colormap.
*/

/*!
    \fn int QColormap::size() const

    Returns the size of the colormap for \c Indexed and \c Gray modes;
    Returns -1 for \c Direct mode.

    \sa colormap()
*/

/*!
    \fn uint QColormap::pixel(const QColor &color) const

    Returns a device dependent pixel value for the \a color.

    \sa colorAt()
*/

/*!
    \fn int QColormap::depth() const

    Returns the depth of the device.

    \sa size()
*/

/*!
    \fn QColormap::Mode QColormap::mode() const

    Returns the mode of this colormap.

    \sa QColormap::Mode
*/

/*!
    \fn const QColor QColormap::colorAt(uint pixel) const

    Returns a QColor for the \a pixel.

    \sa pixel()
*/

/*!
    \fn const QList<QColor> QColormap::colormap() const

    Returns a list of colors which represents the devices colormap
    for \c Indexed and \c Gray modes.  This function returns an empty
    list for \c Direct mode.

    \sa size()
*/

/*! \since 4.2

    \fn QColormap &QColormap::operator=(const QColormap &colormap)

    Assigns the given \a colormap to \e this color map and returns
    a reference to \e this color map.
*/

/*!
   \fn void QColormap::initialize()
   \internal
*/

/*!
   \fn void QColormap::cleanup()
   \internal
*/