QColormap Class

QColormap クラスは、デバイスに依存しない QColors をデバイスに依存するピクセル値にマップします。詳細...

ヘッダ #include <QColormap>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets

パブリックタイプ

enum Mode { Direct, Indexed, Gray }

パブリック関数

QColormap(const QColormap &colormap)
~QColormap()
const QColor colorAt(uint pixel) const
const QList<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)

詳細説明

メンバ型ドキュメント

enum QColormap::Mode

この列挙型は、QColormap 、デバイスに依存しないRGB値をデバイスに依存するピクセル値にマッピングする方法を記述する。

定数説明
QColormap::Direct0ピクセル値はRGB値から直接導かれます。
QColormap::Indexed1ピ ク セル値は、 利用可能な色の リ ス ト への イ ンデ ッ ク ス を表 し ます。 すなわち、QColormap は、 RGB 値に も っ と も 近 く 一致す る 色の イ ンデ ッ ク ス を用い ます。
QColormap::Gray2Indexed と同様に、ピクセル値は利用可能なグレートーンのリストを表します。QColormap は、RGB 値の計算グレートーンに最も近いグレートーンのインデックスを使用します。

メンバ関数ドキュメント

QColormap::QColormap(const QColormap &colormap)

別のcolormap のコピーを作成する。

[noexcept] QColormap::~QColormap()

カラーマップを破壊する。

const QColor QColormap::colorAt(uint pixel) const

pixelQColor を返す。

pixel()も参照のこと

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

Indexed およびGray モードのデバイスのカラーマップを表す色のリストを返す。この関数は、Direct モードに対しては空のリストを返す。

size()も参照

int QColormap::depth() const

デバイスの深さを返します。

size()も参照

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

指定されたscreen のカラーマップを返す。screen が -1 の場合、この関数はデフォルト画面のカラーマップを返す。

QColormap::Mode QColormap::mode() const

このカラーマップのモードを返します。

QColormap::Modeも参照

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

color のデバイス依存のピクセル値を返す。

colorAt()も参照

int QColormap::size() const

Indexed およびGray モードの場合、カラーマップのサイズを返す。Direct モードの場合は -1 を返す。

colormap()も参照

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

与えられたcolormapこのカラーマップに割り当て、このカラーマップへの参照を返します。

© 2025 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 the GNU 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.