
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQColormap class maps device independent QColors to device dependent pixel values.More...
| Header: | #include <QColormap> |
| enum | Mode { Direct, Indexed, Gray } |
| QColormap(const QColormap & colormap) | |
| ~QColormap() | |
| const QColor | colorAt(uint pixel) const |
| const QVector<QColor> | colormap() const |
| int | depth() const |
| Mode | mode() const |
| uint | pixel(const QColor & color) const |
| int | size() const |
| QColormap & | operator=(const QColormap & colormap) |
TheQColormap class maps device independent QColors to device dependent pixel values.
This enum describes howQColormap maps device independent RGB values to device dependent pixel values.
| Constant | Value | Description |
|---|---|---|
QColormap::Direct | 0 | Pixel values are derived directly from the RGB values, also known as "True Color." |
QColormap::Indexed | 1 | Pixel values represent indexes into a vector of available colors, i.e.QColormap uses the index of the color that most closely matches an RGB value. |
QColormap::Gray | 2 | Similar toIndexed, pixel values represent a vector of available gray tones.QColormap uses the index of the gray tone that most closely matches the computed gray tone of an RGB value. |
Constructs a copy of anothercolormap.
Destroys the colormap.
Returns aQColor for thepixel.
See alsopixel().
Returns a vector of colors which represents the devices colormap forIndexed andGray modes. This function returns an empty vector forDirect mode.
See alsosize().
Returns the depth of the device.
See alsosize().
[static]HPALETTE QColormap::hPal()This function is only available on Windows.
Returns an handle to the HPALETTE used by this colormap. If no HPALETTE is being used, this function returns zero.
[static]QColormap QColormap::instance(int screen = -1)Returns the colormap for the specifiedscreen. Ifscreen is -1, this function returns the colormap for the default screen.
Returns the mode of this colormap.
See alsoQColormap::Mode.
Returns a device dependent pixel value for thecolor.
See alsocolorAt().
Returns the size of the colormap forIndexed andGray modes; Returns -1 forDirect mode.
See alsocolormap().
Assigns the givencolormap tothis color map and returns a reference tothis color map.
This function was introduced in Qt 4.2.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.