SetSrcClipRect example for Delphi

procedure TForm1.SetSrcClipRect1Click(Sender: TObject);

var
NewLeft, NewTop, NewWidth, NewHeight: integer;
begin
NewLeft := LEADImage1.SrcClipLeft+ Round(LEADImage1.SrcClipWidth * 0.1);
NewTop := LEADImage1.SrcClipTop + Round(LEADImage1.SrcClipHeight * 0.1);
NewWidth := Round(LEADImage1.SrcClipWidth * 0.8);
NewHeight := Round(LEADImage1.SrcClipHeight * 0.8);
If ((NewWidth > 1) And (NewHeight >1)) then
   LEADImage1.SetSrcClipRect(NewLeft, NewTop, NewWidth, NewHeight);
LEADImage1.BackErase :=True;
LEADImage1.ForceRepaint();
end;