ImageEn, unit imageenview

TImageEnView.OnCustomRetouch

TImageEnView.OnCustomRetouch

Declaration

property OnCustomRetouch: TIEBitmapEvent;

Description

Occurs whenever the brushed area must be painted if MouseInteractGeneral = [miRetouchTool] and RetouchMode = iertCustom.
The bitmap will only be the current area of the image being updated.

Note:
You must not change the size of the bitmap!
The event only occurs at the end of a paint operation (i.e. on mouse up, not for each movement)

Example

procedure TForm1.ImageEnView1btnRemoveRed(Sender: TObject);
begin
  ImageEnView1.MouseInteractGeneral    := [miRetouchTool];
  ImageEnView1.RetouchTool.RetouchMode := iertCustom;
end;

procedure TForm1.ImageEnView1CustomRetouch(Sender: TObject; Bitmap: TIEBitmap);
var
  proc: TImageEnProc;
begin
  // Reduce redness of brushed area
  proc := TImageEnProc.CreateFromBitmap( Bitmap );
  proc.IntensityRGBAll( -50, 0, 0 );
  proc.Free();
end;