QColormap 类将设备无关 QColor 映射到设备从属像素值。 更多...
头: | #include <QColormap> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
enum | Mode { Direct, Indexed, Gray } |
QColormap (const QColormap & colormap ) | |
~QColormap () | |
const QColor | colorAt (uint pixel ) const |
const QList<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 | 实例 (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 list 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 list 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 .
[noexcept]
QColormap::
~QColormap
()
销毁颜色映射。
返回 QColor 为 pixel .
另请参阅 pixel ().
Returns a list of colors which represents the devices colormap for
Indexed
and
Gray
modes. This function returns an empty list for
Direct
模式。
另请参阅 size ().
返回设备的深度。
另请参阅 size ().
[static]
QColormap
QColormap::
实例
(
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.