ImageEn, unit iexUserInteractions

TIEBrushToolInteraction.TransparencyMode

TIEBrushToolInteraction.TransparencyMode

Declaration

property TransparencyMode: TIETransparencyMode;

Description

Specify the way a transparent brush is painted.
Item Description
ietmCompositing Color and alpha will be merged with existing content (e.g. if Transparency = 128 the painted area may have an alpha between 128 - 255, and existing content will be partially visible)
ietmReplace Existing content will be replaced with the painted color and specified alpha (e.g. if Transparency = 128 and brush color is red, the painted area will be red with alpha of 128. Existing content will not be visible in painted area)

Default: ietmCompositing

Examples

// Merge red brush, alpha of painted area will be 128-255 depending on existing value, existing image content will be merged with red (i.e. visible, but more red)
ImageEnView1.BrushTool.BrushColor := clRed;
ImageEnView1.BrushTool.Transparency := 128;
ImageEnView1.BrushTool.TransparencyMode := ietmCompositing;


// Paint solid red brush, painted area will have alpha 128, existing content will be replaced with red pixels
ImageEnView1.BrushTool.BrushColor := clRed;
ImageEnView1.BrushTool.Transparency := 128;
ImageEnView1.BrushTool.TransparencyMode := ietmReplace;


// Enable painting of the alpha channel (set transparency to 50% without changing the image content)
ImageEnView1.BrushTool.BrushShape   := iecsCircle;
ImageEnView1.BrushTool.BrushFill    := iebfSolid;
ImageEnView1.BrushTool.BrushSize    := 50;
ImageEnView1.BrushTool.Transparency := 128;
ImageEnView1.BrushTool.TransparencyMode := ietmReplace;
ImageEnView1.MouseInteractGeneral  := [ miBrushTool ];

See Also

Transparency