CreateFadedMask method (Main Control)

Visual Basic example
Visual C++ 5.0 example

Syntax short CreateFadedMask(OLE_HANDLE hBitmap, short iLength, short iFadeRate, short iStepSize, short iInflate, short iFlag, short iMaxGray, OLE_COLOR crTransparent);

Overview:  Refer to Combining Images.

Remarks

(DigitalPaint only) Creates a fade mask bitmap in which the color of each pixel is changed with respect to its position in the bitmap. This change depends on the fade rate. This method is only available in the DigitalPaint toolkits.

This method is concerned with the size and shape of the region, not the bitmap itself. Therefore, any bitmap with a region can be used to create a fade mask bitmap. The fade mask bitmap can be used by the FeatherAlphaBlend method to combine two bitmaps with feathering.

If the FADE_OUTER flag is not set, then the size of the fade mask bitmap is equal to the size of a region and the fade progresses toward the center of the region. If the FADE_OUTER flag is set, the size is equal to the size of region plus the iInflate value and the fade starts at the edge of the region and progresses toward the edge of the fade mask bitmap. (The iInflate parameter is used only with FADE_OUTER flag)

In order to use the fade mask bitmap in the FeatherAlphaBlend method the fade mask bitmap must contain three portions:

a) A portion in which the output (from the blending function) will be the same as the destination bitmap. This is called the Transparency portion of the mask and it’s filled with black.

b) A portion in which the output is a combination of the destination and source bitmap.

c) A portion in which the output comes from the source bitmap. This is called the Dump portion of the mask and it’s filled with white.

See Also

Elements:  Underlay method, Combine method, FeatherAlphaBlend method, AlphaBlend method

Topics:  Raster Images: Combining Images
Image Processing