TextureAlphaBlend method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int TextureAlphaBlend(int nXDst, int nYDst, int nWidth, int nHeight, TBitmapHandle SrcBitmap, int nXSrc, int nYSrc, TBitmapHandle MaskBitmap, int nOpacity, TBitmapHandle UnderlayBitmap, PPoint pOffset);

Delphi Syntax

Function TextureAlphaBlend (nXDst: L_INT; nYDst: L_INT; nWidth: L_INT; nHeight: L_INT; SrcBitmap: TBitmapHandle; nXSrc: L_INT; nYSrc: L_INT; MaskBitmap: TBitmapHandle; nOpacity: L_INT; UnderlayBitmap: TBitmapHandle; pOffset: pPOINT): L_INT;

Overview

Refer to Combining Images

Remarks

(Raster Pro and above toolkits) Combines image data from MaskBitmap and UnderlayBitmap with an underlay effect. The result is used as a fade mask that will be used to combine SrcBitmap and the destination bitmap (the bitmap currently loaded in the Main Control and accessed through the Bitmap property (Main Control)) with variable opacity. The result is combined again with the destination bitmap using a constant opacity specified in iOpacity.

To use this method, the user must unlock the Raster Pro features by calling UnlockSupport method using the L_SUPPORT_LTPRO option type.

To combine two bitmaps with a fixed opacity, use the AlphaBlend method.

To combine two bitmaps with feathering, use the FeatherAlphaBlend method or FeatherAlphaBlendExt method.

To create a bitmap that contains a fade mask, use the CreateFadedMask method.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

The following is an example using this method with the following characteristics:

The source bitmap is a red image.

The destination bitmap is a white image.

The opacity is set to 255.

The right image is the result of applying the method without texture bitmap.

The left image is the result of applying the method with texture bitmap.

image\TextureAlphaBlend.gif.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

Underlay method, Combine method, AlphaBlend method, FeatherAlphaBlend method, CreateFadedMask method, FeatherAlphaBlendExt method.

Topics:

Raster Images: Combining Images