GxMetafile.CreateFromFile

Syntax

CreateFromFile(FileName: String);

Parameters

FileName. The path to the Windows metafile and its name.

Description

The CreateFromFile constructor creates a new Windows metafile from the file specified in the FileName parameter.

Example

Function GetMetafileFromFile(FileName: String): IGxMetafile;
Var
    Mtf: IGxMetafile;
Begin
    If File.Exists(FileName) Then
        Mtf := New GxMetafile.CreateFromFile(FileName);
        Return Mtf;
    Else
        Return Null;
    End If;
End Function GetMetafileFromFile;

The function returns the metafile obtained from the file, path to which is specified as an input parameter.

See also:

GxImage