QColormap Class Reference |
enum | Mode { Direct, Indexed, Gray } |
QColormap ( const QColormap & colormap ) | |
~QColormap () | |
const QColor | colorAt ( uint pixel ) const |
const QVector<QColor> | colormap () const |
int | depth () const |
Mode | mode () const |
uint | pixel ( const QColor & color ) const |
int | size () const |
QColormap & | operator= ( const QColormap & colormap ) |
HPALETTE | hPal () |
QColormap | instance ( int screen = -1 ) |
The QColormap class maps device independent QColors to device dependent pixel values.
This enum describes how QColormap maps device independent RGB values to device dependent pixel values.
Constant | Value | Description |
---|---|---|
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. |
Constructs a copy of another colormap.
Destroys the colormap.
Returns a QColor for the pixel.
See also pixel().
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().
Returns the depth of the device.
See also size().
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.
Returns the colormap for the specified screen. If screen is -1, this function returns the colormap for the default screen.
Returns the mode of this colormap.
See also QColormap::Mode.
Returns a device dependent pixel value for the color.
See also colorAt().
Returns the size of the colormap for Indexed and Gray modes; Returns -1 for Direct mode.
See also colormap().
Assigns the given colormap to this color map and returns a reference to this color map.
This function was introduced in Qt 4.2.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com