ImageEn, unit iexUserInteractions

TIEBrushToolInteraction.EraserOpacity

TIEBrushToolInteraction.EraserOpacity

Declaration

property EraserOpacity: Double;

Description

Specify the percentage that the brush will erase content if BrushFill is iebfEraser or iebfSmartEraser.
1.0 will completely erase (Alpha will become 0), whereas 0.5 would set pixels of Alpha 255 to 128.


Note:
By default, iebfEraser will also apply color to the image. Configure this using EraserColor
Use IEAlphaToOpacityD to convert an alpha value (0-255) to opacity (0.0-1.0)

Default: 1.0

Example

// Set cursor as an eraser
ImageEnView1.BrushTool.BrushFill     := iebfEraser;
ImageEnView1.BrushTool.EraserOpacity := 1.0;
ImageEnView1.MouseInteractGeneral    := [ miBrushTool ];

// Erase at 50% transparency
ImageEnView1.BrushTool.EraserOpacity := IEAlphaToOpacityD( 128 ); // = Opacity of 0.5


See Also

EraserColor
Transparency
RightButtonEraser
IEAlphaToOpacityD