Vcl.Graphics.TBitmap.Mask

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Mask(TransparentColor: TColor);

C++

void __fastcall Mask(System::Uitypes::TColor TransparentColor);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TBitmap

Description

Converts the current bitmap image into a monochrome mask, replacing TransparentColor with white and every other color with black.

Use Mask to produce a monochrome mask bitmap based on a given transparent color. Mask produces the same image that MaskHandle does, except that the resulting mask image replaces the image in the TBitmap object, so it only makes sense to call Mask once. Use MaskHandle when only a bitmap handle of the mask image is needed.

See Also