이 페이지에서

QColormap Class

QColormap 클래스는 장치 독립적인 QColor를 장치 의존적인 픽셀 값으로 매핑합니다. 더 보기...

헤더: #include <QColormap>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
상태: 6.11 버전부터 사용 중단됨

이 클래스는 6.11 버전부터 사용 중단되었습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.

공개 유형

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 값에서 직접 파생되며, 이를 "트루 컬러(True Color)"라고도 합니다.
QColormap::Indexed1픽셀 값은 사용 가능한 색상 목록의 인덱스를 나타냅니다. 즉, QColormap 는 RGB 값과 가장 근접한 색상의 인덱스를 사용합니다.
QColormap::Gray2Indexed 와 마찬가지로, 픽셀 값은 사용 가능한 회색조 목록을 나타냅니다. QColormap 는 RGB 값의 계산된 회색조와 가장 근접한 회색조의 인덱스를 사용합니다.

멤버 함수 문서

QColormap::QColormap(const QColormap &colormap)

다른 ` colormap` 객체의 복사본을 생성합니다.

[noexcept] QColormap::~QColormap()

컬러맵을 삭제합니다.

const QColor QColormap::colorAt(uint pixel) const

pixel 에 대한 QColor 를 반환합니다.

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 ’을 이 색상 맵에 할당하고, 이 색상 맵에 대한 참조를 반환합니다.

© 2026 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.