AutoSize Example for Delphi
This example shows how the AutoSize property works when loading and when rotating an image.
var
RasterProc: LEADRasterProcess;
RasterIO: LEADRasterIO;
begin
RasterProc:= CreateComObject (CLASS_LEADRasterProcess) as LEADRasterProcess;
RasterIO:= CreateComObject (CLASS_LEADRasterIO ) as LEADRasterIO;
LEADRasterView1.AutoSize := True;
RasterIO.Load ( LEADRasterView1.Raster, 'v:\images\image1.cmp', 0, 0, 1 ) ;
ShowMessage ( 'Control is sized to fit the loaded bitmap' ) ;
RasterProc.Rotate ( LEADRasterView1.Raster, 4500, ROTATE_RESIZE, RGB(0, 0, 0)) ;
ShowMessage ( 'Control is sized to fit the rotated bitmap' ) ;
end;