QColormap 類將設備無關 QColor 映射到設備從屬像素值。 更多...
| 頭: | #include <QColormap> |
| qmake: | QT += widgets |
| enum | Mode { Direct, Indexed, Gray } |
| QColormap (const QColormap & colormap ) | |
| QColormap & | operator= (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 | instance (int screen = -1) |
此枚舉描述如何 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 .
賦值給定 colormap to this color map and returns a reference to this color map.
該函數在 Qt 4.2 引入。
銷毀顔色映射。
返迴 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 ().