Qt 4.8
Public Functions | Public Variables | List of all members
Blend_ARGB32_on_RGB16_SourceAndConstAlpha Struct Reference

Public Functions

 Blend_ARGB32_on_RGB16_SourceAndConstAlpha (quint32 alpha)
 
void flush (void *)
 
void write (quint16 *dst, quint32 src)
 

Public Variables

quint32 m_alpha
 

Detailed Description

Definition at line 160 of file qblendfunctions.cpp.

Constructors and Destructors

◆ Blend_ARGB32_on_RGB16_SourceAndConstAlpha()

Blend_ARGB32_on_RGB16_SourceAndConstAlpha::Blend_ARGB32_on_RGB16_SourceAndConstAlpha ( quint32  alpha)
inline

Definition at line 161 of file qblendfunctions.cpp.

161  {
162  m_alpha = (alpha * 255) >> 8;
163  }

Functions

◆ flush()

void Blend_ARGB32_on_RGB16_SourceAndConstAlpha::flush ( void *  )
inline

Definition at line 176 of file qblendfunctions.cpp.

176 {}

◆ write()

void Blend_ARGB32_on_RGB16_SourceAndConstAlpha::write ( quint16 dst,
quint32  src 
)
inline

Definition at line 165 of file qblendfunctions.cpp.

165  {
166  src = BYTE_MUL(src, m_alpha);
167  const quint8 alpha = qAlpha(src);
168  if(alpha) {
170  if(alpha < 255)
171  s += BYTE_MUL_RGB16(*dst, 255 - alpha);
172  *dst = s;
173  }
174  }
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16(uint x, uint a)
Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb)
Definition: qrgb.h:66
unsigned char quint8
Definition: qglobal.h:934
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned short quint16
Definition: qglobal.h:936
static quint16 convert_argb32_to_rgb16(quint32 spix)

Properties

◆ m_alpha

quint32 Blend_ARGB32_on_RGB16_SourceAndConstAlpha::m_alpha

Definition at line 178 of file qblendfunctions.cpp.


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