ImageEn, unit iesettings

TIEGlobalSettings.EMFBackgroundColor

TIEGlobalSettings.EMFBackgroundColor


Declaration

property EMFBackgroundColor: TColor;


Description

Specifies the default background color when loading EMF/WMF images. This is used by TImageEnIO.LoadFromFile and TImageEnMView loading.
It is not used when importing using ImportMetaFile.

If EMFBackgroundColor = clNone, then metafiles are loaded with an alpha (transparent) background. Otherwise, they are loaded with the specified solid color background.

Default: clNone


Example

// Load EMF/WMF with a white background
IEGlobalSettings().EMFBackgroundColor := clWhite;
ImageEnView1.IO.LoadFromFile( 'C:\input.wmf' );

// Which is the same as calling...
ImageEnView1.IO.ImportMetaFile( 'C:\input.wmf', -1, -1, False, clWhite );

// Load EMF/WMF with a transparent background
IEGlobalSettings().EMFBackgroundColor := clNone;
ImageEnView1.IO.LoadFromFile( 'C:\input.wmf' );

// Which is the same as calling...
ImageEnView1.IO.ImportMetaFile( 'C:\input.wmf', -1, -1, True );