- Main Page
- Modules
- Classes
- Files

# Alpha

## Functions
void | CxImage::AlphaClear ()
bool | CxImage::AlphaCreate ()
void | CxImage::AlphaDelete ()
void | CxImage::AlphaInvert ()
bool | CxImage::AlphaMirror ()
bool | CxImage::AlphaFlip ()
bool | CxImage::AlphaCopy (CxImage &from)
bool | CxImage::AlphaSplit (CxImage *dest)
void | CxImage::AlphaStrip ()
void | CxImage::AlphaSet (BYTE level)
bool | CxImage::AlphaSet (CxImage &from)
void | CxImage::AlphaSet (const long x, const long y, const BYTE level)
BYTE | CxImage::AlphaGet (const long x, const long y)
BYTE | CxImage::AlphaGetMax () const
void | CxImage::AlphaSetMax (BYTE nAlphaMax)
bool | CxImage::AlphaIsValid ()
BYTE * | CxImage::AlphaGetPointer (const long x=0, const long y=0)
bool | CxImage::AlphaFromTransparency ()
void | CxImage::AlphaPaletteClear ()
void | CxImage::AlphaPaletteEnable (bool enable=true)
bool | CxImage::AlphaPaletteIsEnabled ()
bool | CxImage::AlphaPaletteIsValid ()
bool | CxImage::AlphaPaletteSplit (CxImage *dest)

## Detailed Description

## Function Documentation

void CxImage::AlphaClear | ( |  | ) | `[inherited]`

Sets the alpha channel to full transparent. AlphaSet(0) has the same effect

bool CxImage::AlphaCopy | ( | CxImage & | from | ) | `[inherited]`

Imports an existing alpa channel from another image with the same width and height.

bool CxImage::AlphaCreate | ( |  | ) | `[inherited]`

Allocates an empty (opaque) alpha channel.

void CxImage::AlphaDelete | ( |  | ) | `[inherited]`

bool CxImage::AlphaFlip | ( |  | ) | `[inherited]`

bool CxImage::AlphaFromTransparency | ( |  | ) | `[inherited]`

Merge in the alpha layer the transparent color mask (previously set with SetTransColor or SetTransIndex)

BYTE CxImage::AlphaGet | ( | const long | x,
|  | const long | y |
| ) |  |  | `[inherited]`

Gets the alpha level for a single pixel

BYTE CxImage::AlphaGetMax | ( |  | ) | const`[inherited]`

See also:
  AlphaSetMax

BYTE * CxImage::AlphaGetPointer | ( | const long | x = `0`,
|  | const long | y = `0` |
| ) |  |  | `[inherited]`

Returns pointer to alpha data for pixel (x,y).

Author:
  ***bd*** 2.2004

void CxImage::AlphaInvert | ( |  | ) | `[inherited]`

bool CxImage::AlphaIsValid | ( |  | ) | `[inherited]`

Checks if the image has a valid alpha channel.

bool CxImage::AlphaMirror | ( |  | ) | `[inherited]`

void CxImage::AlphaPaletteClear | ( |  | ) | `[inherited]`

Resets the alpha palette

void CxImage::AlphaPaletteEnable | ( | bool | enable = `true` | ) | `[inherited]`

Enables the alpha palette, so the Draw() function changes its behavior.

bool CxImage::AlphaPaletteIsEnabled | ( |  | ) | `[inherited]`

True if the alpha palette is enabled for painting.

bool CxImage::AlphaPaletteIsValid | ( |  | ) | `[inherited]`

Checks if the image has a valid alpha palette.

bool CxImage::AlphaPaletteSplit | ( | CxImage * | dest | ) | `[inherited]`

Exports the alpha palette channel in a 8bpp grayscale image.

void CxImage::AlphaSet | ( | const long | x,
|  | const long | y,
|  | const BYTE | level |
| ) |  |  | `[inherited]`

Sets the alpha level for a single pixel

bool CxImage::AlphaSet | ( | CxImage & | from | ) | `[inherited]`

Creates the alpha channel from a gray scale image.

void CxImage::AlphaSet | ( | BYTE | level | ) | `[inherited]`

Sets the alpha level for the whole image.

Parameters:

  | level | : from 0 (transparent) to 255 (opaque)

void CxImage::AlphaSetMax | ( | BYTE | nAlphaMax | ) | `[inherited]`

Sets global Alpha (opacity) value applied to the whole image, valid only for painting functions.

Parameters:

  | nAlphaMax,: | can be from 0 to 255

bool CxImage::AlphaSplit | ( | CxImage * | dest | ) | `[inherited]`

Exports the alpha channel in a 8bpp grayscale image.

void CxImage::AlphaStrip | ( |  | ) | `[inherited]`

Blends the alpha channel and the alpha palette with the pixels. The result is a 24 bit image. The background color can be selected using SetTransColor().