Sign in Join
FPDoc Onlineexperiment

TRasterImage.RequestTransparentColor function

Member of TRasterImageprotectedIn unit Graphics

Gets the color used to represent transparent pixels in the image.

Declaration

pascal
function RequestTransparentColor: TColor

Description

RequestTransparentColor is a TColor function used to resolve the color value for transparent pixels in the image. It is used to translate the value clDefault in the TransparentColor property to an actual color value.

When TransparentColor is set to clDefault, the return value for the method is used as the color for transparent pixels. The return value is the pixel color stored at the bottom-left corner of the image (x = 0, y = Height-1).

If TransparentColor contains a different TColor value, it is used in its unmodified form.

When Empty returns True, raw image data is not available and the return value is set to clNone.

RequestTransparentColor is also called when the value in TransparentMode is changed to tmAuto. If TransparentMode is set to tmFixed, the TransparentColor is used as specified.

See also

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