内容表

上一话题

QColorDialog

下一话题

QColumnView

QColormap

QColormap class maps device independent QColors to device dependent pixel values. 更多

Inheritance diagram of PySide2.QtWidgets.QColormap

概要

函数

静态函数

详细描述

class QColormap ( colormap )
param colormap

QColormap

Constructs a copy of another colormap .

PySide2.QtWidgets.QColormap. 模式

This enum describes how QColormap maps device independent RGB values to device dependent pixel values.

常量

描述

QColormap.Direct

Pixel values are derived directly from the RGB values, also known as “True Color.”

QColormap.Indexed

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

类似 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.

static PySide2.QtWidgets.QColormap. cleanup ( )
PySide2.QtWidgets.QColormap. colorAt ( pixel )
参数

pixel uint

返回类型

QColor

返回 QColor pixel .

另请参阅

pixel()

PySide2.QtWidgets.QColormap. colormap ( )
返回类型

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

另请参阅

size()

PySide2.QtWidgets.QColormap. depth ( )
返回类型

int

Returns the depth of the device.

另请参阅

size()

static PySide2.QtWidgets.QColormap. initialize ( )
static PySide2.QtWidgets.QColormap. instance ( [ screen=-1 ] )
参数

screen int

返回类型

QColormap

Returns the colormap for the specified screen 。若 screen is -1, this function returns the colormap for the default screen.

PySide2.QtWidgets.QColormap. mode ( )
返回类型

模式

Returns the mode of this colormap.

另请参阅

模式

PySide2.QtWidgets.QColormap. pixel ( color )
参数

color QColor

返回类型

uint

Returns a device dependent pixel value for the color .

另请参阅

colorAt()

PySide2.QtWidgets.QColormap. size ( )
返回类型

int

Returns the size of the colormap for Indexed and Gray modes; Returns -1 for Direct 模式。

另请参阅

colormap()