Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QColormap Class

TheQColormap class maps device independent QColors to device dependent pixel values.More...

Header:#include <QColormap>

Public Types

enumMode { Direct, Indexed, Gray }

Public Functions

QColormap(const QColormap & colormap)
~QColormap()
const QColorcolorAt(uint pixel) const
const QVector<QColor>colormap() const
intdepth() const
Modemode() const
uintpixel(const QColor & color) const
intsize() const
QColormap &operator=(const QColormap & colormap)

Static Public Members

HPALETTEhPal()
QColormapinstance(int screen = -1)

Detailed Description

TheQColormap class maps device independent QColors to device dependent pixel values.

Member Type Documentation

enum QColormap::Mode

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

ConstantValueDescription
QColormap::Direct0Pixel values are derived directly from the RGB values, also known as "True Color."
QColormap::Indexed1Pixel 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::Gray2Similar toIndexed, 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.

Member Function Documentation

QColormap::QColormap(constQColormap & colormap)

Constructs a copy of anothercolormap.

QColormap::~QColormap()

Destroys the colormap.

constQColor QColormap::colorAt(uint pixel) const

Returns aQColor for thepixel.

See alsopixel().

constQVector<QColor> QColormap::colormap() const

Returns a vector of colors which represents the devices colormap forIndexed andGray modes. This function returns an empty vector forDirect mode.

See alsosize().

int QColormap::depth() const

Returns the depth of the device.

See alsosize().

[static]HPALETTE QColormap::hPal()

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.

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

Returns the colormap for the specifiedscreen. Ifscreen is -1, this function returns the colormap for the default screen.

Mode QColormap::mode() const

Returns the mode of this colormap.

See alsoQColormap::Mode.

uint QColormap::pixel(constQColor & color) const

Returns a device dependent pixel value for thecolor.

See alsocolorAt().

int QColormap::size() const

Returns the size of the colormap forIndexed andGray modes; Returns -1 forDirect mode.

See alsocolormap().

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

Assigns the givencolormap tothis color map and returns a reference tothis color map.

This function was introduced in Qt 4.2.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp