[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Graphics' (#lcl)

TRasterImage.RequestTransparentColor

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

Declaration

Source position: graphics.pp line 1293

protected function TRasterImage.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

TRasterImage.TransparentColor

  

Color used for transparent pixels in the image.

TRasterImage.TransparentMode

  

Determines how transparent pixels are represented in the image.

TGraphic.Empty

  

Indicates if the graphic is empty (contains no data).

TTransparentMode

  

Represents transparency modes used in raster images.


Version 4.0 Generated 2025-05-03 Home