PLASMAINFO

typedef struct tagPLASMAINFO
{
   L_UINT uStructSize;
   L_UINT uRedFreq;
   L_UINT uGreenFreq;
   L_UINT uBlueFreq;
   L_UINT uOpacity;
   L_UINT uShift;
   L_UINT uSize;
   L_UINT uFlags;
} PLASMAINFO, L_FAR * LPPLASMAINFO;

The PLASMAINFO structure provides information about the color to be used in the LBitmap::PlasmaFilter function.

Member

Description

uStructSize

Size of this structure, in bytes. Use the sizeof operator to calculate this value.

uRedFreq

Value that indicates which frequencies of red color should be used to create plasma patterns. Valid range for the 16, 48, and 64-bit bitmaps is from 0 to 65535 and for 12-bit bitmaps from 0 to 4095. Otherwise, it is from 0 to 255. Use 0 to turn off processing for the red frequencies.

uGreenFreq

Value that indicates which frequencies of green color should be used to create plasma patterns. Valid range for the 16, 48, and 64-bit bitmaps is from 0 to 65535 and for 12-bit bitmaps from 0 to 4095. Otherwise, it is from 0 to 255. Use 0 to turn off processing for the green frequencies.

uBlueFreq

Value that indicates which frequencies of blue color should be used to create plasma patterns. Valid range for the 16, 48, and 64-bit bitmaps is from 0 to 65535 and for 12-bit bitmaps from 0 to 4095. Otherwise, it is from 0 to 255. Use 0 to turn off processing for the blue frequencies.

uOpacity

A percentage value that indicates the amount of blending between the plasma color patterns and the original image. Possible values range from 0 to 100. Use 0 when not using an image, and 100 when not using the plasma values.

uShift

The amount of color shift in the plasma color pattern. Valid range for the 16, 48, and 64-bit bitmaps is from 0 to 65535 and for 12-bit bitmaps from 0 to 4095. Otherwise, it is from 0 to 255. A value of 0 means there is no color shift.

uSize

Value greater than 0 that represents the plasma size. (The value is divided internally by 100). The value, after it has been divided by 100, represents the size in pixels.

uFlags

Flags that indicate which type of plasma effect to create, and which color pattern to use. You can use a bitwise OR (|) to specify one flag from each group.

The following flags indicate which type of plasma effect to create:

 

Value

Meaning

 

PLSTYP_VERTICAL

[0x0000] Create vertical lines of plasma.

 

PLSTYP_HORIZONTAL

[0x0001] Create horizontal lines of plasma.

 

PLSTYP_DIAGONAL

[0x0002] Create diagonal lines of plasma.

 

PLSTYP_CROSS

[0x0003] Create crossed lines of plasma.

 

PLSTYP_CIRCULAR

[0x0004] Create circles of plasma.

 

PLSTYP_RANDOM1

[0x0005] Create randomly shaped plasma.

 

PLSTYP_RANDOM2

[0x0006] Create a different type of randomly shaped plasma

 

The following flags indicate which color pattern to use:

 

Value

Meaning

 

PLSCLR_HUE

[0x0000] Use the first predefined color pattern

 

PLSCLR_RGB1

[0x0010] Use the second predefined color pattern.

 

PLSCLR_RGB2

[0x0020] Use the third predefined color pattern.

 

PLSCLR_CUST

[0x0030] Use the frequency members (uRedFreq, uGreenFreq, uBlueFreq) of the PLASMAINFO structure to generate user-defined plasma colors.

Comments

The uOpacity value will always be considered to be 0, unless specified otherwise by a value between (and including) 0 to 100.

Use the uRedFreq, uGreenFreq, and uBlueFreq members of the PLASMAINFO structure to create a custom color pattern. To use them, pass the PLSCLR_CUST flag to LBitmap::PlasmaFilter. Otherwise, their values will be ignored.

The PLSCLR_HUE value is a predefined color pattern that is based on the HLS color space. It creates plasma patterns by changing hue values.

The PLSCLR_RGB1 value is a predefined color pattern that is based on the RGB color space. Different combinations of red, green and blue frequencies produce different results.

Like the PLSCLR_RGB1 value, the PLSCLR_RGB2 value is based on the RGB color space, but uses a different combination of red, green and blue frequencies.

The color palette used for uShift is a continuous cylindrical color palette. In the following figures, one shows where on the palette a value of 0 lies, and the other one shows where on the palette the maximum value lies:

image\uShift.gif