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

Public Functions

uchar alpha (uchar src) const
 
quint16 bytemul (quint16 x) const
 
 SourceAndConstAlpha (int a)
 

Public Variables

int m_alpha255
 
int m_alpha256
 

Detailed Description

Definition at line 54 of file qblendfunctions.cpp.

Constructors and Destructors

◆ SourceAndConstAlpha()

SourceAndConstAlpha::SourceAndConstAlpha ( int  a)
inline

Definition at line 56 of file qblendfunctions.cpp.

56  : m_alpha256(a) {
57  m_alpha255 = (m_alpha256 * 255) >> 8;
58  };
long ASN1_INTEGER_get ASN1_INTEGER * a

Functions

◆ alpha()

uchar SourceAndConstAlpha::alpha ( uchar  src) const
inline

Definition at line 59 of file qblendfunctions.cpp.

59 { return (src * m_alpha256) >> 8; }

◆ bytemul()

quint16 SourceAndConstAlpha::bytemul ( quint16  x) const
inline

Definition at line 60 of file qblendfunctions.cpp.

60  {
61  uint t = (((x & 0x07e0)*m_alpha255) >> 8) & 0x07e0;
62  t |= (((x & 0xf81f)*(m_alpha255>>2)) >> 6) & 0xf81f;
63  return t;
64  }
unsigned int uint
Definition: qglobal.h:996

Properties

◆ m_alpha255

int SourceAndConstAlpha::m_alpha255

Definition at line 65 of file qblendfunctions.cpp.

◆ m_alpha256

int SourceAndConstAlpha::m_alpha256

Definition at line 66 of file qblendfunctions.cpp.


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