Qt 4.8
Public Functions | Properties | List of all members
quint18 Class Reference

#include <qdrawhelper_p.h>

Public Functions

 operator quint32 ()
 
 quint18 (quint32 v)
 

Properties

uchar data [3]
 

Detailed Description

Definition at line 1561 of file qdrawhelper_p.h.

Constructors and Destructors

◆ quint18()

quint18::quint18 ( quint32  v)
inline

Definition at line 1564 of file qdrawhelper_p.h.

1565  {
1566  uchar b = qBlue(v);
1567  uchar g = qGreen(v);
1568  uchar r = qRed(v);
1569  uint p = (b >> 2) | ((g >> 2) << 6) | ((r >> 2) << 12);
1570  data[0] = qBlue(p);
1571  data[1] = qGreen(p);
1572  data[2] = qRed(p);
1573  }
Q_GUI_EXPORT_INLINE int qRed(QRgb rgb)
Definition: qrgb.h:57
unsigned char uchar
Definition: qglobal.h:994
uchar data[3]
unsigned int uint
Definition: qglobal.h:996
Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb)
Definition: qrgb.h:63
Q_GUI_EXPORT_INLINE int qGreen(QRgb rgb)
Definition: qrgb.h:60

Functions

◆ operator quint32()

quint18::operator quint32 ( )
inline

Definition at line 1575 of file qdrawhelper_p.h.

1576  {
1577  const uchar r = (data[2] << 6) | ((data[1] & 0xf0) >> 2) | (data[2] & 0x3);
1578  const uchar g = (data[1] << 4) | ((data[0] & 0xc0) >> 4) | ((data[1] & 0x0f) >> 2);
1579  const uchar b = (data[0] << 2) | ((data[0] & 0x3f) >> 4);
1580  return qRgb(r, g, b);
1581  }
unsigned char uchar
Definition: qglobal.h:994
uchar data[3]
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)
Definition: qrgb.h:69

Properties

◆ data

uchar quint18::data[3]
private

Definition at line 1584 of file qdrawhelper_p.h.


The documentation for this class was generated from the following file: