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

Public Functions

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

Public Variables

quint32 m_alpha
 

Detailed Description

Definition at line 125 of file qblendfunctions.cpp.

Constructors and Destructors

◆ Blend_ARGB24_on_RGB16_SourceAndConstAlpha()

Blend_ARGB24_on_RGB16_SourceAndConstAlpha::Blend_ARGB24_on_RGB16_SourceAndConstAlpha ( quint32  alpha)
inline

Definition at line 126 of file qblendfunctions.cpp.

126  {
127  m_alpha = (alpha * 255) >> 8;
128  }

Functions

◆ flush()

void Blend_ARGB24_on_RGB16_SourceAndConstAlpha::flush ( void *  )
inline

Definition at line 141 of file qblendfunctions.cpp.

141 {}

◆ write()

void Blend_ARGB24_on_RGB16_SourceAndConstAlpha::write ( quint16 dst,
qargb8565  src 
)
inline

Definition at line 130 of file qblendfunctions.cpp.

130  {
131  src = src.byte_mul(src.alpha(m_alpha));
132  const uint alpha = src.alpha();
133  if (alpha) {
134  quint16 s = src.rawValue16();
135  if (alpha < 255)
136  s += BYTE_MUL_RGB16(*dst, 255 - alpha);
137  *dst = s;
138  }
139  }
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16(uint x, uint a)
quint8 alpha() const
unsigned short quint16
Definition: qglobal.h:936
unsigned int uint
Definition: qglobal.h:996
qargb8565 byte_mul(quint8 a) const
quint16 rawValue16() const

Properties

◆ m_alpha

quint32 Blend_ARGB24_on_RGB16_SourceAndConstAlpha::m_alpha

Definition at line 143 of file qblendfunctions.cpp.


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