FMX.Graphics.TBitmap.CreateFromBitmapAndMask

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

constructor CreateFromBitmapAndMask(const Bitmap, Mask: TBitmap);

Properties

Type Visibility Source Unit Parent
constructor public FMX.Graphics.pas FMX.Graphics TBitmap

Description

Constructs a TBitmap object by applying a mask to an existing TBitmap object.

The Bitmap parameter specifies the TBitmap on which the mask is applied.

The Mask parameter is the applied mask.

The created TBitmap has the value of the Alpha channel of each color pixel equal with the value of the Red channel in the Mask.

Tip: For a better result, use a grayscale image for Mask. It has an equal amount of green, red, and blue.

Tip: The mask and the base bitmap must have the same dimensions. Otherwise the new TBitmap will have the dimensions equal to 0.

See Also

Code Examples