FMX.Filter.Effects.TColorKeyAlphaEffect
Delphi
TColorKeyAlphaEffect = class(TImageFXEffect)
C++
class PASCALIMPLEMENTATION TColorKeyAlphaEffect : public TImageFXEffect
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | FMX.Filter.Effects.pas FMX.Filter.Effects.hpp |
FMX.Filter.Effects | FMX.Filter.Effects |
Description
TColorKeyAlphaEffect is a class for creating an effect that makes pixels of a particular color transparent.
TColorKeyAlphaEffect affects the textures of visual objects.
For further information, go to TImageFXEffect and FireMonkey Image Effects.
Set the ColorKey property to specify the key of the color to become transparent. The tolerance between colors can be changed through the Tolerance property. If Tolerance is 0, no color becomes transparent. As Tolerance is increased, the number of colors that become transparent increases too.
The following table shows the result of the TColorKeyAlphaEffect effect on a .png picture, with transparent background, placed on a form (using a TImage object).
No effect (original picture) | Tolerance=0.3 ColorKey=0 | Tolerance=0.3 ColorKey=0.5 |
---|---|---|