1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
9 \brief The QColormap class maps device independent QColors to device
10 dependent pixel values.
13/*! \enum QColormap::Mode
15 This enum describes how QColormap maps device independent RGB
16 values to device dependent pixel values.
18 \value Direct Pixel values are derived directly from the RGB
19 values, also known as "True Color."
21 \value Indexed Pixel values represent indexes into a list of
22 available colors, i.e. QColormap uses the index of the color that
23 most closely matches an RGB value.
25 \value Gray Similar to \c Indexed, pixel values represent a list
26 of available gray tones. QColormap uses the index of the gray
27 tone that most closely matches the computed gray tone of an RGB
32 \fn QColormap QColormap::instance(int screen)
34 Returns the colormap for the specified \a screen. If \a screen is
35 -1, this function returns the colormap for the default screen.
39 \fn QColormap::QColormap(const QColormap &colormap)
41 Constructs a copy of another \a colormap.
45 \fn QColormap::~QColormap()
47 Destroys the colormap.
51 \fn int QColormap::size() const
53 Returns the size of the colormap for \c Indexed and \c Gray modes;
54 Returns -1 for \c Direct mode.
60 \fn uint QColormap::pixel(const QColor &color) const
62 Returns a device dependent pixel value for the \a color.
68 \fn int QColormap::depth() const
70 Returns the depth of the device.
76 \fn QColormap::Mode QColormap::mode() const
78 Returns the mode of this colormap.
84 \fn const QColor QColormap::colorAt(uint pixel) const
86 Returns a QColor for the \a pixel.
92 \fn const QList<QColor> QColormap::colormap() const
94 Returns a list of colors which represents the devices colormap
95 for \c Indexed and \c Gray modes. This function returns an empty
96 list for \c Direct mode.
103 \fn QColormap &QColormap::operator=(const QColormap &colormap)
105 Assigns the given \a colormap to \e this color map and returns
106 a reference to \e this color map.
110 \fn void QColormap::initialize()
115 \fn void QColormap::cleanup()