LibreOffice Module vcl (master)  1
Classes | Macros
ColorMask.hxx File Reference
#include <vcl/dllapi.h>
#include <vcl/BitmapColor.hxx>
Include dependency graph for ColorMask.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ColorMaskElement
 
class  ColorMask
 

Macros

#define MASK_TO_COLOR(d_nVal, d_RM, d_GM, d_BM, d_RS, d_GS, d_BS, d_Col)
 
#define COLOR_TO_MASK(d_rCol, d_RM, d_GM, d_BM, d_RS, d_GS, d_BS, d_ALPHA)
 

Macro Definition Documentation

#define COLOR_TO_MASK (   d_rCol,
  d_RM,
  d_GM,
  d_BM,
  d_RS,
  d_GS,
  d_BS,
  d_ALPHA 
)
Value:
( ( ( ( d_RS < 0 ) ? ( static_cast<sal_uInt32>((d_rCol).GetRed()) >> -d_RS ) : \
( static_cast<sal_uInt32>((d_rCol).GetRed()) << d_RS ) ) & d_RM ) | \
( ( ( d_GS < 0 ) ? ( static_cast<sal_uInt32>((d_rCol).GetGreen()) >> -d_GS ) : \
( static_cast<sal_uInt32>((d_rCol).GetGreen()) << d_GS ) ) & d_GM ) | \
( ( ( d_BS < 0 ) ? ( static_cast<sal_uInt32>((d_rCol).GetBlue()) >> -d_BS ) : \
( static_cast<sal_uInt32>((d_rCol).GetBlue()) << d_BS ) ) & d_BM ) | \
d_ALPHA )

Definition at line 35 of file ColorMask.hxx.

Referenced by ColorMask::SetColorFor16BitLSB(), ColorMask::SetColorFor16BitMSB(), ColorMask::SetColorFor32Bit(), and ColorMask::SetColorFor8Bit().

#define MASK_TO_COLOR (   d_nVal,
  d_RM,
  d_GM,
  d_BM,
  d_RS,
  d_GS,
  d_BS,
  d_Col 
)
Value:
const sal_uInt8 _def_cR = static_cast<sal_uInt8>( d_RS < 0 ? ( (d_nVal) & d_RM ) << -d_RS : ( (d_nVal) & d_RM ) >> d_RS ); \
const sal_uInt8 _def_cG = static_cast<sal_uInt8>( d_GS < 0 ? ( (d_nVal) & d_GM ) << -d_GS : ( (d_nVal) & d_GM ) >> d_GS ); \
const sal_uInt8 _def_cB = static_cast<sal_uInt8>( d_BS < 0 ? ( (d_nVal) & d_BM ) << -d_BS : ( (d_nVal) & d_BM ) >> d_BS ); \
d_Col = BitmapColor( static_cast<sal_uInt8>( _def_cR | ( ( _def_cR & maR.mnOr ) >> maR.mnOrShift ) ), \
static_cast<sal_uInt8>( _def_cG | ( ( _def_cG & maG.mnOr ) >> maG.mnOrShift ) ), \
static_cast<sal_uInt8>( _def_cB | ( ( _def_cB & maB.mnOr ) >> maB.mnOrShift ) ) );
unsigned char sal_uInt8

Definition at line 26 of file ColorMask.hxx.

Referenced by ColorMask::GetColorAndAlphaFor32Bit(), ColorMask::GetColorFor16BitLSB(), ColorMask::GetColorFor16BitMSB(), ColorMask::GetColorFor32Bit(), and ColorMask::GetColorFor8Bit().