Src... example for Delphi
This example uses the source rectangle properties to zoom in on the image.
var
sRet: Smallint;
begin
//Calculate the values to zoom in by 10 percent and center the image.
if ((LEADRasterView1.SrcWidth > 1) And (LEADRasterView1.SrcHeight > 1)) then
begin
LEADRasterView1.SrcWidth:= LEADRasterView1.SrcWidth * 0.9;
LEADRasterView1.SrcHeight:= LEADRasterView1.SrcHeight * 0.9;
LEADRasterView1.SrcTop:= (LEADRasterView1.Raster.BitmapHeight - LEADRasterView1.SrcHeight) / 2;
LEADRasterView1.SrcLeft:= (LEADRasterView1.Raster.BitmapWidth - LEADRasterView1.SrcWidth) / 2;
end;
//Set the clipping area to the same as the source rectangle
LEADRasterView1.SrcClipWidth:= LEADRasterView1.SrcWidth;
LEADRasterView1.SrcClipHeight:= LEADRasterView1.SrcHeight;
LEADRasterView1.SrcClipTop:= LEADRasterView1.SrcTop;
LEADRasterView1.SrcClipLeft:= LEADRasterView1.SrcLeft;
//Redisplay the image
LEADRasterView1.ForceRepaint (sRet);
end;