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!


Example

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

procedure TForm1.ImageEnView1CustomRetouch(Sender: TObject; Bitmap: TIEBitmap);
begin
  // Reduce redness of brushed area
  With TImageEnProc.CreateFromBitmap( Bitmap ) do
  begin
    IntensityRGBall( -20, 0, 0 );
    Free;
  end;
end;