RasterizeViewMode Example for Delphi
// This example will set current viewport mode to L2D_USE_WIDTH_AND_HEIGHT,
// sets the current viewport size to 400*400 pixels and then loads a DXF file
var
RasterIO: LEADRasterIO;
begin
LEADRasterView1.Raster.UnlockSupport ( L_SUPPORT_VECTOR_DXF, 'TestKey' ) ;
RasterIO:= CreateComObject(CLASS_LEADRasterIO) as LEADRasterIO;
//Set viewport mode to L2D_USE_WIDTH_HEIGHT
RasterIO.RasterizeViewMode:= L2D_USE_WIDTH_HEIGHT;
//Set viewport size to 400*400 pixels
RasterIO.RasterizeViewportWidth:= 400;
RasterIO.RasterizeViewportHeight:= 400;
//Load a DXF file
RasterIO.Load (LEADRasterView1.Raster, 'v:\images\Test.dxf', 0, 0, 1);
end;