ImageEn, unit iesettings

TIEGlobalSettings.SVGParams

TIEGlobalSettings.SVGParams


Declaration

property SVGParams: TIESVGParams;


Description

Specify advanced configuration options when loading or importing SVG files.

Property Description Default Value
AllowWebDownload Whether web based images are supported in SVG files (which must be downloaded) True
ForceBackground Forces the SVG layer to be drawn with the specified background color (removing the transparent background) clNone (disabled)
MaxLayerSize Prevents overly large SVG files from overloading the system by skipping any layer larger than the specified size in any dimension 10000 (pixels)
MaxPointCount Prevents overly complex path tags from being drawn, by skipping any with more than the specified number of points (Note: This value is doubled for polygon layers) 5000
MaxTagCount Prevents loading of overly complex SVG files, by failing for fails that exceed the specified number of tags 2000


Examples

// Prevent downloading of web based files
IEGlobalSettings().SVGParams.AllowWebDownload := False;

// Allow more complex SVG files to be imported (may overwhelm application)
IEGlobalSettings().SVGParams.MaxTagCount   := 5000;
IEGlobalSettings().SVGParams.MaxPointCount := 10000;
IEGlobalSettings().SVGParams.MaxLayerSize  := 20000;
ImageEnView1.LayersImport( 'D:\Import.svg' );

// Force white background for SVG files
IEGlobalSettings().SVGParams.ForceBackground := clWhite;
ImageEnView1.IO.ImportFromFileSVG( 'C:\Test.svg' );