Qt 4.8
Classes | Functions
qglgradientcache.cpp File Reference
#include "qglgradientcache_p.h"
#include <private/qdrawhelper_p.h>
#include <private/qgl_p.h>
#include <QtCore/qmutex.h>

Go to the source code of this file.

Classes

class  QGL2GradientCacheWrapper
 

Functions

static uint qtToGlColor (uint c)
 

Function Documentation

◆ qtToGlColor()

static uint qtToGlColor ( uint  c)
inlinestatic

Definition at line 136 of file qglgradientcache.cpp.

Referenced by QGL2GradientCache::generateGradientColorTable().

137 {
138  uint o;
139 #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
140  o = (c & 0xff00ff00) // alpha & green already in the right place
141  | ((c >> 16) & 0x000000ff) // red
142  | ((c << 16) & 0x00ff0000); // blue
143 #else //Q_BIG_ENDIAN
144  o = (c << 8)
145  | ((c >> 24) & 0x000000ff);
146 #endif // Q_BYTE_ORDER
147  return o;
148 }
unsigned char c[8]
Definition: qnumeric_p.h:62
unsigned int uint
Definition: qglobal.h:996