BackErase example for Delphi
This example turns off repainting of the background, and then zooms out to show the effect when repainting.
var
sRet: smallint;
begin
LEADRasterView1.BackErase := False;
LEADRasterView1.AutoRepaint := False;
LEADRasterView1.AutoScroll := False;
//Calculate the values to zoom out by 10 percent and center the image.
LEADRasterView1.DstWidth := LEADRasterView1.DstWidth * 0.9;
LEADRasterView1.DstHeight := LEADRasterView1.DstHeight * 0.9;
LEADRasterView1.DstTop := (LEADRasterView1.ScaleHeight - LEADRasterView1.DstHeight) / 2;
LEADRasterView1.DstLeft := (LEADRasterView1.ScaleWidth - LEADRasterView1.DstWidth) / 2;
//Set the clipping area to the same as the destination rectangle
LEADRasterView1.DstClipWidth := LEADRasterView1.DstWidth;
LEADRasterView1.DstClipHeight := LEADRasterView1.DstHeight;
LEADRasterView1.DstClipTop := LEADRasterView1.DstTop;
LEADRasterView1.DstClipLeft := LEADRasterView1.DstLeft;
//Redisplay the image
LEADRasterView1.ForceRepaint (sRet);
end;