Unit 'Graphics' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

TRasterImage.TransparentColor

Color used to represent transparent pixels in the image.

Declaration

Source position: graphics.pp line 1362

public property TRasterImage.TransparentColor : TColor
  read GetTransparentColor
  write SetTransparentColor
  default clDefault;

Description

TransparentColor is a TColor property which indicates the color used to represent transparent pixels in the raw image data. Pixels with this color are not drawn on the image - so they have a transparent appearance. The default value for the property is clDefault.

TransparentColor is used along with TransparentMode to determine whether a fixed color is used for transparency, or if the transparent color is read from a specified pixel in the raw image data.

When TransparentColor contains clDefault, the RequestTransparentColor method is used to get the transparency color value from the bottom-left pixel in the raw image data.

When setting a new value for the property, the TransparentMode property may be updated as well. When clDefault is assigned to the property, TransparentMode is set to tmAuto. For other color values, TransparentMode is set to tmFixed.

The ApplyTransparent method is called to apply the effective transparency for the image using the values in Transparent, TransparentColor, and TransparentMode.

Version info

Modified in LCL version 4.2 to call ApplyTransparent when the property value has been changed.

See also

TRasterImage.RequestTransparentColor

  

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

TRasterImage.TransparentMode

  

Determines how transparent pixels are represented in the image.

TRasterImage.ApplyTransparent

  

Applies transparency to an image based on the settings in Transparent, TransparentColor, and TransparentMode.

TRasterImage.MaskHandleAllocated

  

MaskHandleAllocated - returns True if a handle has been allocated for the Mask.

TRasterImage.MaskHandle

  

The handle allocated for the Bitmap Mask.

TRasterImage.Changed

  

Changed - method to call when properties have changed.

TGraphic.Transparent

  

Indicates whether some parts of the image are not opaque.

TGraphic.Modified

  

Indicates if the graphic data in the class instance has been modified.

TGraphic.OnChange

  

Event handler signalled when data in the class instance is changed.

TColor

  

Color type used by most LCL drawing functions.



CT Web help

CodeTyphon Studio