Vcl.Graphics.TGraphic.Transparent
Delphi
property Transparent: Boolean read GetTransparent write SetTransparent;
C++
__property bool Transparent = {read=GetTransparent, write=SetTransparent, nodefault};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Vcl.Graphics.pas Vcl.Graphics.hpp |
Vcl.Graphics | TGraphic |
Description
Indicates whether the image covers its rectangular area.
Use Transparent to specify that the graphic be drawn transparently. Some descendants of TGraphic such as TIcon and TMetafile are always transparent, so setting the property for those objects does not change their behavior. However, the TBitmap graphic's drawing is affected by this property. The TImage component sets this property to be the same as its Transparent property to achieve transparent painting.
When the Transparent property is set to True, you can either specify a color as the transparent color or you can use the default color, which is the pixel in the lower left. The specified color is not displayed in the graphic, which lets the background show through. This can be useful in layering and for non-rectangular graphics.
Code Examples