I have added an OnUserInteraction handler to this ImageEn demo:
procedure TForm1.ImageEnView1UserInteraction(Sender: TObject; Event: TIEUserInteractionEvent; Info: Integer);
case Event of
if ImageEnView1.IEBitmap.HasAlphaChannel(True) then
ImageEnView1.SetChessboardStyle(16, Graphics.bsSolid, clWhite, $00EEEEEE);
ImageEnView1.BackgroundStyle := iebsChessboard;
ImageEnView1.BackgroundStyle := iebsSolid;
This shows a chessboard background for transparent areas. (The modified demo project is attached).
Then I loaded the image file colorfields.png that is contained in the attached zip file.
Then I configured the Brush Type as Eraser:
Then I painted with the configured Eraser Brush:
You can see that while the upper left semi-transparent color field has a Chessboard background, the area painted with the Eraser Brush has NO chessboard background! Why? Isn't the Eraser supposed to set the Alpha Transparency of the painted area to 0 when EraserOpacity = 1.0?
Documentation: "TIEBrushToolInteraction.EraserOpacity: 1.0 will completely erase (Alpha will become 0)."