QColormap Class
The QColormap class maps device independent QColors to device dependent pixel values. More...
Header: | #include <QColormap> |
qmake: | QT += widgets |
Public Types
enum | Mode { Direct, Indexed, Gray } |
Public Functions
QColormap(const QColormap &colormap) | |
~QColormap() | |
const QColor | colorAt(uint pixel) const |
const QVector<QColor> | colormap() const |
int | depth() const |
QColormap::Mode | mode() const |
uint | pixel(const QColor &color) const |
int | size() const |
QColormap & | operator=(const QColormap &colormap) |
Static Public Members
void | cleanup() |
void | initialize() |
QColormap | instance(int screen = -1) |
Detailed Description
The QColormap class maps device independent QColors to device dependent pixel values.
Member Type Documentation
enum QColormap::Mode
This enum describes how QColormap 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 to Indexed , 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. |
Member Function Documentation
QColormap::QColormap(const QColormap &colormap)
Default constructs an instance of QColormap.
QColormap::~QColormap()
Destroys the instance of QColormap.
[static]
void QColormap::cleanup()
const QColor QColormap::colorAt(uint pixel) const
const QVector<QColor> QColormap::colormap() const
int QColormap::depth() const
[static]
void QColormap::initialize()
[static]
QColormap QColormap::instance(int screen = -1)
QColormap::Mode QColormap::mode() const
uint QColormap::pixel(const QColor &color) const
int QColormap::size() const
QColormap &QColormap::operator=(const QColormap &colormap)
Copy-assignment operator.