Qt:Документация 4.3.2/qcolormap

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QColormap Class Reference
[модуль QtGui ]

The QColormap class maps device independent QColors to device dependent pixel values. Далее...

 #include <QColormap>

[править] Открытые типы

  • enum Mode { Direct, Indexed, Gray }

[править] Открытые функции

[править] Статические открытые члены


[править] Подробное описание

The QColormap class maps device independent QColors to device dependent pixel values.


[править] Описание типов

[править]
enum QColormap::Mode

This enum describes how 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 Similar to 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 )

Constructs a copy of another colormap.

[править]
QColormap::~QColormap ()

Destroys the colormap.

[править]
const QColor QColormap::colorAt ( uint pixel ) const

Returns a QColor for the pixel.

See also 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 mode.

See also size().

[править]
int QColormap::depth () const

Returns the depth of the device.

See also size().

[править]
HPALETTE QColormap::hPal () [static]

This function is only available on Windows.

Returns an handle to the HPALETTE used by this colormap. If no HPALETTE is being used, this function returns zero.

[править]
QColormap QColormap::instance ( int screen = -1 ) [static]

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

[править]
Mode QColormap::mode () const

Returns the mode of this colormap.

See also QColormap::Mode.

[править]
uint QColormap::pixel ( const QColor & color ) const

Returns a device dependent pixel value for the color.

See also colorAt().

[править]
int QColormap::size () const

Returns the size of the colormap for Indexed and Gray modes; Returns -1 for Direct mode.

See also colormap().

[править]
QColormap & QColormap::operator= ( const QColormap & colormap )

Assigns the given colormap to this color map and returns a reference to this color map.

Эта функция была введена в Qt 4.2.



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2