Skip to main content

TdxGPImage.MakeComposition(TdxGPImage,Byte,Byte) Method

Blends two images using the alpha channel.

Declaration

function MakeComposition(AOverlayImage: TdxGPImage; AOverlayAlpha: Byte; ASourceAlpha: Byte): TdxGPImage; overload;

Parameters

Name Type
AOverlayImage TdxGPImage
AOverlayAlpha Byte
ASourceAlpha Byte

Returns

Type
TdxGPImage

Remarks

Call either of the overloaded function variants and pass another Smart Image container as the AOverlay parameter to blend the stored images in both the current and specified containers. The MakeComposition functions return a new TdxGPImage container with an image combined from the base (that is, stored in the current container) and an overlay image. The base image’s visibility depends on the overlay image’s alpha value passed as the AOverlayAlpha paramerer.

The second overloaded MakeComposition function variant also accepts the base image’s alpha value as the ASourceAlpha parameter. If the parameter value is less than 255, the combined image is translucent, even if the base image is opaque (that is, has no transparent pixels).

Note

You can use the IsAlphaUsed property to identify if the stored image is translucent.

See Also