Qt 4.8
Typedefs | Functions | Variables
qrgb.h File Reference
#include <QtCore/qglobal.h>

Go to the source code of this file.

Typedefs

typedef unsigned int QRgb
 

Functions

Q_GUI_EXPORT_INLINE int qAlpha (QRgb rgb)
 
Q_GUI_EXPORT_INLINE int qBlue (QRgb rgb)
 
Q_GUI_EXPORT_INLINE int qGray (int r, int g, int b)
 
Q_GUI_EXPORT_INLINE int qGray (QRgb rgb)
 
Q_GUI_EXPORT_INLINE int qGreen (QRgb rgb)
 
Q_GUI_EXPORT_INLINE bool qIsGray (QRgb rgb)
 
Q_GUI_EXPORT_INLINE int qRed (QRgb rgb)
 
Q_GUI_EXPORT_INLINE QRgb qRgb (int r, int g, int b)
 
Q_GUI_EXPORT_INLINE QRgb qRgba (int r, int g, int b, int a)
 

Variables

const QRgb RGB_MASK = 0x00ffffff
 

Typedef Documentation

◆ QRgb

typedef unsigned int QRgb
related

Definition at line 53 of file qrgb.h.

Function Documentation

◆ qAlpha()

Q_GUI_EXPORT_INLINE int qAlpha ( QRgb  rgb)
related

Definition at line 66 of file qrgb.h.

Referenced by QPdfEnginePrivate::addImage(), QImage::alphaChannel(), QFontEngine::alphaMapForGlyph(), alphaMapFromPath(), QFontEngine::alphaRGBMapForGlyph(), blend_color_rgb16(), blendColor(), qrgb444::byte_mul(), QGLGlyphCache::cacheGlyphs(), cgColorForQColor(), comp_func_ColorBurn_impl(), comp_func_ColorDodge_impl(), comp_func_Darken_impl(), comp_func_DestinationAtop(), comp_func_DestinationIn(), comp_func_DestinationOut(), comp_func_DestinationOver(), comp_func_Difference_impl(), comp_func_Exclusion_impl(), comp_func_HardLight_impl(), comp_func_Lighten_impl(), comp_func_Multiply_impl(), comp_func_Overlay_impl(), comp_func_Screen_impl(), comp_func_SoftLight_impl(), comp_func_solid_ColorBurn_impl(), comp_func_solid_ColorDodge_impl(), comp_func_solid_Darken_impl(), comp_func_solid_DestinationAtop(), comp_func_solid_DestinationIn(), comp_func_solid_DestinationOut(), comp_func_solid_DestinationOver(), comp_func_solid_Difference_impl(), comp_func_solid_Exclusion_impl(), comp_func_solid_HardLight_impl(), comp_func_solid_Lighten_impl(), comp_func_solid_Multiply_impl(), comp_func_solid_Overlay_impl(), comp_func_solid_Screen_impl(), comp_func_solid_SoftLight_impl(), comp_func_solid_SourceAtop(), comp_func_solid_SourceIn(), comp_func_solid_SourceOut(), comp_func_solid_SourceOver(), comp_func_solid_XOR(), comp_func_SourceAtop(), comp_func_SourceIn(), comp_func_SourceOut(), comp_func_SourceOver(), comp_func_XOR(), darkenPixmap(), QWindowsVistaAnimation::drawBlendedImage(), QMacStylePrivate::drawColorlessButton(), QWin32PrintEngine::drawTextItem(), fillRect_normalized(), fix_color_table(), QWindowsXPStylePrivate::fixAlphaChannel(), QRasterBuffer::flushToARGBImage(), QMacPixmapData::fromImage(), QX11PixmapData::fromImage(), QWindowsMobileStyle::generatedIconPixmap(), QCommonStyle::generatedIconPixmap(), QMacStyle::generatedIconPixmap(), QGradientCache::generateGradientColorTable(), getOperator(), QDirectFBScreen::getSurfaceDescription(), grayscale(), QMacPixmapData::macGetAlphaChannel(), QMacPixmapData::macSetAlphaChannel(), QPixmapData::mask(), QPdf::patternForBrush(), pixel_distance(), qabgr8888::qabgr8888(), qargb4444::qargb4444(), qargb6666::qargb6666(), qargb8555::qargb8555(), qargb8565::qargb8565(), qt_alphamapblit_quint32(), qt_alphargbblit_quint32(), qt_blend_argb32_on_argb32(), qt_blend_argb32_on_rgb16_const_alpha(), qt_blend_color_argb_x86(), qt_mac_create_iconref(), qt_write_dibv5(), rgbBlendPixel(), QImage::setAlphaChannel(), QImage::setColor(), QImage::setColorTable(), QPixmap::toWinHICON(), QRasterPaintEngine::updateState(), ICOReader::write(), Blend_ARGB32_on_RGB16_SourceAlpha::write(), Blend_ARGB32_on_RGB16_SourceAndConstAlpha::write(), Blend_ARGB32_on_ARGB32_SourceAlpha::write(), Blend_ARGB32_on_ARGB32_SourceAndConstAlpha::write(), write_xpm_image(), and QPNGImageWriter::writeImage().

67 { return rgb >> 24; }
#define rgb(r, g, b)
Definition: qcolor_p.cpp:130

◆ qBlue()

Q_GUI_EXPORT_INLINE int qBlue ( QRgb  rgb)
related

Definition at line 63 of file qrgb.h.

Referenced by QPdfEnginePrivate::addImage(), QScreen::alloc(), QAlphaWidget::alphaBlend(), buttonChange(), qrgb444::byte_mul(), cgColorForQColor(), QGLContext::choosePixelFormat(), comp_func_ColorBurn_impl(), comp_func_ColorDodge_impl(), comp_func_Darken_impl(), comp_func_Difference_impl(), comp_func_Exclusion_impl(), comp_func_HardLight_impl(), comp_func_Lighten_impl(), comp_func_Multiply_impl(), comp_func_Overlay_impl(), comp_func_Screen_impl(), comp_func_SoftLight_impl(), comp_func_solid_ColorBurn_impl(), comp_func_solid_ColorDodge_impl(), comp_func_solid_Darken_impl(), comp_func_solid_Difference_impl(), comp_func_solid_Exclusion_impl(), comp_func_solid_HardLight_impl(), comp_func_solid_Lighten_impl(), comp_func_solid_Multiply_impl(), comp_func_solid_Overlay_impl(), comp_func_solid_Screen_impl(), comp_func_solid_SoftLight_impl(), compressHelper(), convert_RGB_to_Indexed8(), QVNCServer::convertPixels(), darkenPixmap(), QWindowsVistaAnimation::drawBlendedImage(), QMacStylePrivate::drawColorlessButton(), QWin32PrintEngine::drawTextItem(), QGLColormap::findNearest(), QGLCmap::findNearest(), QWindowsXPStylePrivate::fixAlphaChannel(), QRasterBuffer::flushToARGBImage(), QX11PixmapData::fromImage(), QMacStyle::generatedIconPixmap(), QGradientCache::generateGradientColorTable(), QDirectFBScreen::getSurfaceDescription(), QColorShower::hsvEd(), init_gray(), init_indexed(), QMacPixmapData::macSetAlphaChannel(), QPdf::patternForBrush(), pixel_distance(), qabgr8888::qabgr8888(), qargb4444::qargb4444(), qargb6666::qargb6666(), qargb8555::qargb8555(), qargb8565::qargb8565(), qGamma_correct_back_to_linear_cs(), qrgb444::qrgb444(), qrgb555::qrgb555(), qrgb565::qrgb565(), qrgb666::qrgb666(), qrgb888::qrgb888(), qStoreColors(), qt_alphamapblit_quint32(), qt_alphargbblit_quint32(), qt_colorConvert(), qt_conv16ToRgb(), qt_convRgbTo16(), qt_mac_read_fontsmoothing_settings(), qt_transparent_pixel(), qt_write_dibv5(), query_colormap(), quint18::quint18(), quint24::quint24(), QApplication::qwsSetCustomColors(), QLinuxFbScreen::restore(), rgbBlendPixel(), QImage::rgbSwapped(), QImage::setAlphaChannel(), QColorShower::setHsv(), QColorShower::setRgb(), QMacStyle::styleHint(), QColorShower::updateQColor(), QTiffHandler::write(), ICOReader::write(), write_jpeg_image(), write_xpm_image(), and QPNGImageWriter::writeImage().

64 { return (rgb & 0xff); }
#define rgb(r, g, b)
Definition: qcolor_p.cpp:130

◆ qGray() [1/2]

Q_GUI_EXPORT_INLINE int qGray ( int  r,
int  g,
int  b 
)
related

◆ qGray() [2/2]

Q_GUI_EXPORT_INLINE int qGray ( QRgb  rgb)
related

Definition at line 78 of file qrgb.h.

79 { return qGray(qRed(rgb), qGreen(rgb), qBlue(rgb)); }
int qRed(QRgb rgb)
Returns the red component of the ARGB quadruplet rgb.
Definition: qrgb.h:57
int qGray(int r, int g, int b)
Definition: qrgb.h:75
#define rgb(r, g, b)
Definition: qcolor_p.cpp:130
int qGreen(QRgb rgb)
Returns the green component of the ARGB quadruplet rgb.
Definition: qrgb.h:60
int qBlue(QRgb rgb)
Returns the blue component of the ARGB quadruplet rgb.
Definition: qrgb.h:63

◆ qGreen()

Q_GUI_EXPORT_INLINE int qGreen ( QRgb  rgb)
related

Definition at line 60 of file qrgb.h.

Referenced by QPdfEnginePrivate::addImage(), QScreen::alloc(), QAlphaWidget::alphaBlend(), QRasterPaintEngine::alphaPenBlt(), buttonChange(), qrgb444::byte_mul(), cgColorForQColor(), QGLContext::choosePixelFormat(), comp_func_ColorBurn_impl(), comp_func_ColorDodge_impl(), comp_func_Darken_impl(), comp_func_Difference_impl(), comp_func_Exclusion_impl(), comp_func_HardLight_impl(), comp_func_Lighten_impl(), comp_func_Multiply_impl(), comp_func_Overlay_impl(), comp_func_Screen_impl(), comp_func_SoftLight_impl(), comp_func_solid_ColorBurn_impl(), comp_func_solid_ColorDodge_impl(), comp_func_solid_Darken_impl(), comp_func_solid_Difference_impl(), comp_func_solid_Exclusion_impl(), comp_func_solid_HardLight_impl(), comp_func_solid_Lighten_impl(), comp_func_solid_Multiply_impl(), comp_func_solid_Overlay_impl(), comp_func_solid_Screen_impl(), comp_func_solid_SoftLight_impl(), compressHelper(), convert_RGB_to_Indexed8(), QVNCServer::convertPixels(), darkenPixmap(), QWindowsVistaAnimation::drawBlendedImage(), QMacStylePrivate::drawColorlessButton(), QWin32PrintEngine::drawTextItem(), QGLColormap::findNearest(), QGLCmap::findNearest(), QWindowsXPStylePrivate::fixAlphaChannel(), QRasterBuffer::flushToARGBImage(), QX11PixmapData::fromImage(), QMacStyle::generatedIconPixmap(), QGradientCache::generateGradientColorTable(), QDirectFBScreen::getSurfaceDescription(), QColorShower::hsvEd(), init_gray(), init_indexed(), QMacPixmapData::macSetAlphaChannel(), QPdf::patternForBrush(), pixel_distance(), qabgr8888::qabgr8888(), qargb4444::qargb4444(), qargb6666::qargb6666(), qargb8555::qargb8555(), qargb8565::qargb8565(), qGamma_correct_back_to_linear_cs(), qrgb444::qrgb444(), qrgb555::qrgb555(), qrgb565::qrgb565(), qrgb666::qrgb666(), qrgb888::qrgb888(), qStoreColors(), qt_alphamapblit_quint32(), qt_alphargbblit_quint32(), qt_colorConvert(), qt_conv16ToRgb(), qt_convRgbTo16(), qt_mac_read_fontsmoothing_settings(), qt_transparent_pixel(), qt_write_dibv5(), query_colormap(), quint18::quint18(), quint24::quint24(), QApplication::qwsSetCustomColors(), QLinuxFbScreen::restore(), rgbBlendPixel(), QImage::rgbSwapped(), QImage::setAlphaChannel(), QColorShower::setHsv(), QColorShower::setRgb(), QMacStyle::styleHint(), QColorShower::updateQColor(), QTiffHandler::write(), ICOReader::write(), write_jpeg_image(), write_xpm_image(), and QPNGImageWriter::writeImage().

61 { return ((rgb >> 8) & 0xff); }
#define rgb(r, g, b)
Definition: qcolor_p.cpp:130

◆ qIsGray()

Q_GUI_EXPORT_INLINE bool qIsGray ( QRgb  rgb)

Definition at line 81 of file qrgb.h.

Referenced by QImage::allGray().

82 { return qRed(rgb) == qGreen(rgb) && qRed(rgb) == qBlue(rgb); }
int qRed(QRgb rgb)
Returns the red component of the ARGB quadruplet rgb.
Definition: qrgb.h:57
#define rgb(r, g, b)
Definition: qcolor_p.cpp:130
int qGreen(QRgb rgb)
Returns the green component of the ARGB quadruplet rgb.
Definition: qrgb.h:60
int qBlue(QRgb rgb)
Returns the blue component of the ARGB quadruplet rgb.
Definition: qrgb.h:63

◆ qRed()

Q_GUI_EXPORT_INLINE int qRed ( QRgb  rgb)
related

Definition at line 57 of file qrgb.h.

Referenced by QPdfEnginePrivate::addImage(), QScreen::alloc(), QAlphaWidget::alphaBlend(), buttonChange(), qrgb444::byte_mul(), cgColorForQColor(), QGLContext::choosePixelFormat(), comp_func_ColorBurn_impl(), comp_func_ColorDodge_impl(), comp_func_Darken_impl(), comp_func_Difference_impl(), comp_func_Exclusion_impl(), comp_func_HardLight_impl(), comp_func_Lighten_impl(), comp_func_Multiply_impl(), comp_func_Overlay_impl(), comp_func_Screen_impl(), comp_func_SoftLight_impl(), comp_func_solid_ColorBurn_impl(), comp_func_solid_ColorDodge_impl(), comp_func_solid_Darken_impl(), comp_func_solid_Difference_impl(), comp_func_solid_Exclusion_impl(), comp_func_solid_HardLight_impl(), comp_func_solid_Lighten_impl(), comp_func_solid_Multiply_impl(), comp_func_solid_Overlay_impl(), comp_func_solid_Screen_impl(), comp_func_solid_SoftLight_impl(), compressHelper(), convert_RGB_to_Indexed8(), QVNCServer::convertPixels(), darkenPixmap(), QWindowsVistaAnimation::drawBlendedImage(), QMacStylePrivate::drawColorlessButton(), QWin32PrintEngine::drawTextItem(), QGLColormap::findNearest(), QGLCmap::findNearest(), QWindowsXPStylePrivate::fixAlphaChannel(), QRasterBuffer::flushToARGBImage(), QX11PixmapData::fromImage(), QMacStyle::generatedIconPixmap(), QGradientCache::generateGradientColorTable(), QDirectFBScreen::getSurfaceDescription(), QColorShower::hsvEd(), init_gray(), init_indexed(), QMacPixmapData::macSetAlphaChannel(), QPdf::patternForBrush(), pixel_distance(), qabgr8888::qabgr8888(), qargb4444::qargb4444(), qargb6666::qargb6666(), qargb8555::qargb8555(), qargb8565::qargb8565(), qGamma_correct_back_to_linear_cs(), qrgb444::qrgb444(), qrgb555::qrgb555(), qrgb565::qrgb565(), qrgb666::qrgb666(), qrgb888::qrgb888(), qStoreColors(), qt_alphamapblit_quint32(), qt_alphargbblit_quint32(), qt_colorConvert(), qt_conv16ToRgb(), qt_convRgbTo16(), qt_mac_read_fontsmoothing_settings(), qt_transparent_pixel(), qt_write_dibv5(), query_colormap(), quint18::quint18(), quint24::quint24(), QApplication::qwsSetCustomColors(), QLinuxFbScreen::restore(), rgbBlendPixel(), QImage::rgbSwapped(), QImage::setAlphaChannel(), QColorShower::setHsv(), QColorShower::setRgb(), QMacStyle::styleHint(), QPixmap::toWinHICON(), QColorShower::updateQColor(), QTiffHandler::write(), ICOReader::write(), write_jpeg_image(), write_xpm_image(), and QPNGImageWriter::writeImage().

58 { return ((rgb >> 16) & 0xff); }
#define rgb(r, g, b)
Definition: qcolor_p.cpp:130

◆ qRgb()

Q_GUI_EXPORT_INLINE QRgb qRgb ( int  r,
int  g,
int  b 
)
related

Definition at line 69 of file qrgb.h.

Referenced by QScreen::alloc(), QAlphaWidget::alphaBlend(), QImage::alphaChannel(), QFontEngine::alphaRGBMapForGlyph(), checkGrayscale(), colorref2qrgb(), QLinuxFbScreen::connect(), QLinuxFbIntegration::connect(), convert_indexed8_to_ARGB_PM_inplace(), convert_indexed8_to_RGB16_inplace(), convert_indexed8_to_RGB_inplace(), convert_Indexed8_to_X32(), convert_RGB_to_Indexed8(), QLinuxFbScreen::createPalette(), QLinuxFbIntegration::createPalette(), QColorDialog::customColor(), QGIFFormat::decode(), QWindowsXPStyle::drawComplexControl(), QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), ensureValidImage(), QMacPixmapData::fromImage(), QX11PixmapData::fromImage(), init_gray(), init_indexed(), QVFbScreen::initDevice(), QVNCScreen::initDevice(), initRGB(), QImage::isGrayscale(), QMacPixmapData::macGetAlphaChannel(), qrgb565::operator quint32(), qrgb555::operator quint32(), qrgb666::operator quint32(), qrgb888::operator quint32(), quint24::operator quint32(), quint18::operator quint32(), qrgb444::operator quint32(), Tga24Reader::operator()(), QWindowsXPStyle::polish(), QColorShower::QColorShower(), qgl_create_rgb_palette(), qt_colorConvert(), qt_colorref2qrgb(), qt_conv16ToRgb(), qt_qimageScaleAARGB(), query_colormap(), QTiffHandler::read(), ICOReader::read16_24_32BMP(), ICOReader::readColorTable(), QPngHandlerPrivate::readPngImage(), rgbBlendPixel(), QImage::rgbSwapped(), QLinuxFbScreen::set(), setup_qt(), QX11PixmapData::toImage(), QGLContextPrivate::updateFormatVersion(), and QtopiaPrintEnginePrivate::writeG3FaxPage().

70 { return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }

◆ qRgba()

Q_GUI_EXPORT_INLINE QRgb qRgba ( int  r,
int  g,
int  b,
int  a 
)
related

Definition at line 72 of file qrgb.h.

Referenced by QProxyFontEngine::alphaMapForGlyph(), QFontEngineMac::alphaMapForGlyph(), QFontEngineDirectWrite::alphaMapForGlyph(), QFontEngineWin::alphaMapForGlyph(), QFontEngineXLFD::alphaMapForGlyph(), QFontEngineQPF::alphaMapForGlyph(), QFontEngine::alphaMapForGlyph(), QFontEngineFT::alphaMapForGlyph(), QFontEngineQPF1::alphaMapForGlyph(), QFontEngineBox::alphaMapForGlyph(), alphaMapFromPath(), cgColorForQColor(), comp_func_ColorBurn_impl(), comp_func_ColorDodge_impl(), comp_func_Darken_impl(), comp_func_Difference_impl(), comp_func_Exclusion_impl(), comp_func_HardLight_impl(), comp_func_Lighten_impl(), comp_func_Multiply_impl(), comp_func_Overlay_impl(), comp_func_Screen_impl(), comp_func_SoftLight_impl(), comp_func_solid_ColorBurn_impl(), comp_func_solid_ColorDodge_impl(), comp_func_solid_Darken_impl(), comp_func_solid_Difference_impl(), comp_func_solid_Exclusion_impl(), comp_func_solid_HardLight_impl(), comp_func_solid_Lighten_impl(), comp_func_solid_Multiply_impl(), comp_func_solid_Overlay_impl(), comp_func_solid_Screen_impl(), comp_func_solid_SoftLight_impl(), darkenPixmap(), QWindowsVistaAnimation::drawBlendedImage(), QMacStylePrivate::drawColorlessButton(), QX11PixmapData::fromImage(), QCommonStyle::generatedIconPixmap(), QMacStyle::generatedIconPixmap(), grayscale(), ICOReader::iconAt(), QMacPixmapData::macGetAlphaChannel(), QMacPixmapData::macSetAlphaChannel(), qargb8565::operator quint32(), qargb8555::operator quint32(), qargb6666::operator quint32(), qargb4444::operator quint32(), Tga32Reader::operator()(), qabgr8888::qabgr8888(), QColorToOLEColor(), qt_qimageScaleAARGB(), qt_qimageScaleAARGBA(), qt_read_dibv5(), ICOReader::read16_24_32BMP(), QColorShower::rgbEd(), QWSYellowSurface::setPermanentState(), setup_qt(), QX11PixmapData::toImage(), and QColorShower::updateQColor().

73 { return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
long ASN1_INTEGER_get ASN1_INTEGER * a

Variable Documentation

◆ RGB_MASK

const QRgb RGB_MASK = 0x00ffffff

Definition at line 55 of file qrgb.h.

Referenced by QMacPixmapData::macSetAlphaChannel(), and QMacPixmapData::toImage().