Underlay example for Delphi

This example loads a bitmap into LEADRasterView2 and uses it as a tiled underlay for LEADRasterView1.

var
   sRet: Smallint;
   RasterProc: LEADRasterProcess;
   RasterIO:LEADRasterIO;
begin
   RasterProc:= CreateComObject (CLASS_LEADRasterProcess) as LEADRasterProcess;
   RasterIO:= CreateComObject (CLASS_LEADRasterIO) as LEADRasterIO;
   RasterIO.Load (LEADRasterView2.Raster, 'v:\images\ulay2.bmp', 0, 0, 1);
   RasterProc.Underlay (LEADRasterView1.Raster, LEADRasterView2.Raster, UNDERLAY_TILE);
   LEADRasterView1.ForceRepaint (sRet);
end;