SetSrcClipRect example for Delphi
This example crops the image by reducing the source clipping area and repaints the image.
var
sRet: Smallint;
NewLeft, NewTop, NewWidth, NewHeight: Single;
begin
NewLeft := LEADRasterView1.SrcClipLeft + (LEADRasterView1.SrcClipWidth * 0.1);
NewTop := LEADRasterView1.SrcClipTop + (LEADRasterView1.SrcClipHeight * 0.1);
NewWidth := LEADRasterView1.SrcClipWidth * 0.8;
NewHeight := LEADRasterView1.SrcClipHeight * 0.8;
if ((NewWidth > 1) AND (NewHeight >1)) then
LEADRasterView1.SetSrcClipRect (NewLeft, NewTop, NewWidth, NewHeight, sRet);
LEADRasterView1.ForceRepaint (sRet);
end;