32 qWarning(
"no screens available, assuming 24-bit color");
85#ifndef QT_QWS_DEPTH16_RGB
86#define QT_QWS_DEPTH16_RGB 565
136 const int red_shift = 16;
137 const int green_shift = 8;
138 const int red_mask = 0xff0000;
139 const int green_mask = 0x00ff00;
140 const int blue_mask = 0x0000ff;
141 const int tg =
g << green_shift;
142 const int tr =
r << red_shift;
143 return 0xff000000 | (
b & blue_mask) | (tg & green_mask) | (
tr & red_mask);
155 if (d->
depth == 16) {
158 const int red_shift = 16;
159 const int green_shift = 8;
160 const int red_mask = 0xff0000;
161 const int green_mask = 0x00ff00;
162 const int blue_mask = 0x0000ff;
164 (
pixel & green_mask) >> green_shift,
165 (
pixel & blue_mask));
168 Q_ASSERT_X(
int(
pixel) < qt_screen->numCols(),
"QColormap::colorAt",
"pixel out of bounds of palette");
The QColor class provides colors based on RGB, HSV or CMYK values.
QColormap & operator=(const QColormap &colormap)
QColormap(const QColormap &colormap)
static QColormap instance(int screen=-1)
const QList< QColor > colormap() const
uint pixel(const QColor &color) const
const QColor colorAt(uint pixel) const
QScreen * primaryScreen
the primary (or default) screen of the application.
int depth
the color depth of the screen
Combined button and popup list for selecting options.
QT_WARNING_POP void qAtomicAssign(T *&d, T *x)
This is a helper for the assignment operators of implicitly shared classes.
static const int qt_neg_blue_shift
static const int qt_bbits
static const int qt_green_mask
ushort qt_convRgbTo16(QRgb c)
static const int qt_blue_rounding_shift
#define QT_QWS_DEPTH16_RGB
QRgb qt_conv16ToRgb(ushort c)
static const int qt_green_rounding_shift
static const int qt_red_shift
static const int qt_green_shift
static const int qt_gbits
static QColormapPrivate * screenMap
static const int qt_blue_mask
static const int qt_red_rounding_shift
static const int qt_red_mask
static const int qt_rbits
GLboolean GLboolean GLboolean b
GLint GLenum GLsizei GLsizei GLsizei depth
#define Q_ASSERT_X(cond, x, msg)
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
constexpr QRgb qRgb(int r, int g, int b)
constexpr int qRed(QRgb rgb)
constexpr int qGreen(QRgb rgb)
constexpr int qBlue(QRgb rgb)