MFC Grid manual

CColorBlend Class Reference

Contains color information and its transparency level. Used in alpha-blend operations. More...

#include <Dapfor/GUI/ColorBlend.h>

List of all members.


Public Member Functions

 CColorBlend ()
 Default constructor.
 CColorBlend (const CColorBlend &colorBlend)
 Copy constructor.
 CColorBlend (COLORREF color, unsigned char opacity)
 Constructor.
COLORREF GetColor () const
 Gets the color used in alpha-blend operations.
unsigned char GetOpacity () const
 Gets opacity level. 0-transparent, 255-opaque.
void SetColor (COLORREF color)
 Sets a new color.
void SetOpacity (unsigned char opacity)
 Sets a new opacity level. 0-transparent, 255-opaque.
void Serialize (CArchive &ar)
 Serializes the object to/from the archive.

Static Public Member Functions

static int GetSerializeVertion ()
 Current serialization version.

Detailed Description

Contains color information and its transparency level. Used in alpha-blend operations.

Constructor & Destructor Documentation

CColorBlend (  ) 

Default constructor.

Default color is white, Default level equals to 0 - transparent.

CColorBlend ( const CColorBlend blendMode  ) 

Copy constructor.

Parameters:
[in] blendMode constant reference to CColorBlend type object

CColorBlend ( COLORREF  color,
unsigned char  opacity 
)

Constructor.

Parameters:
[in] color Color value
[in] opacity Opacity level. 0-transparent, 255-opaque


Member Function Documentation

COLORREF GetColor (  )  const [inline]

Gets the color used in alpha-blend operations.

Returns:
Color value

unsigned char GetOpacity (  )  const [inline]

Gets opacity level. 0-transparent, 255-opaque.

Returns:
Opacity value

void SetColor ( COLORREF  color  )  [inline]

Sets a new color.

Parameters:
[in] color Sets a new color

void SetOpacity ( unsigned char  opacity  )  [inline]

Sets a new opacity level. 0-transparent, 255-opaque.

Parameters:
[in] opacity Sets a new opacity level

int GetSerializeVertion (  )  [static]

Current serialization version.

Returns:
Current serialization version.

void Serialize ( CArchive &  ar  ) 

Serializes the object to/from the archive.

Parameters:
[in] ar Archive, where the object is serialized.
Exceptions:
CArchiveException::badSchema