QColormap 類

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.

成員類型文檔編製

enum QColormap:: Mode

此枚舉描述如何 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.

成員函數文檔編製

QColormap:: QColormap (const QColormap & colormap )

構造副本為另一 colormap .

QColormap:: ~QColormap ()

銷毀顔色映射。

const QColor QColormap:: colorAt ( uint pixel ) const

返迴 QColor pixel .

另請參閱 pixel ().

const QVector < QColor > QColormap:: colormap () const

Returns a vector of colors which represents the devices colormap for Indexed and Gray modes. This function returns an empty vector for Direct 模式。

另請參閱 size ().

int QColormap:: depth () const

返迴設備的深度。

另請參閱 size ().

[static] QColormap QColormap:: instance ( int screen = -1)

返迴顔色映射為指定 screen 。若 screen is -1, this function returns the colormap for the default screen.

QColormap::Mode QColormap:: mode () const

返迴此顔色映射的模式。

另請參閱 QColormap::Mode .

uint QColormap:: pixel (const QColor & color ) const

返迴設備從屬像素值為 color .

另請參閱 colorAt ().

int QColormap:: size () const

返迴顔色映射大小對於 Indexed and Gray 模式;返迴 -1 對於 Direct 模式。

另請參閱 colormap ().

QColormap &QColormap:: operator= (const QColormap & colormap )

賦值給定 colormap to this color map and returns a reference to this color map.

該函數在 Qt 4.2 引入。