SetRgnMagicWand example for Delphi

procedure TForm1.LEADRasterView1MouseUp (Sender: TObject; Button,
  Shift: Smallint; x, y: Single);
begin
    LEADRasterView1.Raster.SetRgnMagicWand (x, y, 10, L_RGN_SET);
    LEADRasterView1.RgnFrameType:= RGNFRAME_ANIMATED;
end;