The QColormap class maps device independent QColors to device dependent pixel values. 更多...
头: | #include <QColormap> |
qmake: | QT += widgets |
enum | Mode { Direct, Indexed, Gray } |
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 ) |
QColormap | instance (int screen = -1) |
The QColormap class maps device independent QColors to device dependent pixel values.
此枚举描述如何 QColormap maps device independent RGB values to device dependent pixel values.
常量 | 值 | 描述 |
---|---|---|
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
|
类似于
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.
|
构造副本为另一 colormap .
销毁颜色映射。
返回 QColor 为 pixel .
另请参阅 pixel ().
Returns a vector of colors which represents the devices colormap for
Indexed
and
Gray
modes. This function returns an empty vector for
Direct
模式。
另请参阅 size ().
返回设备的深度。
另请参阅 size ().
[static]
QColormap
QColormap::
instance
(
int
screen
= -1)
返回颜色映射为指定 screen 。若 screen is -1, this function returns the colormap for the default screen.
返回此颜色映射的模式。
另请参阅 QColormap::Mode .
返回设备从属像素值为 color .
另请参阅 colorAt ().
返回颜色映射大小对于
Indexed
and
Gray
模式;返回 -1 对于
Direct
模式。
另请参阅 colormap ().
赋值给定 colormap to this color map and returns a reference to this color map.
该函数在 Qt 4.2 引入。