Sign in Join
FPDoc Onlineexperiment

TRasterImage.SetTransparent procedure

Member of TRasterImageprotectedIn unit Graphics

Sets the value for the Transparent property.

Declaration

pascal
procedure SetTransparent(AValue: Boolean); override

Description

SetTransparent ensures that the image in Mask is considered when updating the value in the Transparent property. The Mask is a black & white (1-bit-depth) image to identify the pixels which are skipped when the image is painted and thus should appear transparent. Note that this applies only for images having no alpha channel; when an alpha channel is present, no Mask is required since the transparency is defined by the alpha channel itself.

GetTransparent is called to retrieve the existing property value.

No actions are performed in the method if the existing property value is the same as AValue. Otherwise, ApplyTransparent is called to apply the effective image transparency using the values in Transparent, TransparentMode, and TransparentColor.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.