GxMetafile.CreateFromStream

Fore Syntax

CreateFromStream(Stream: IIOStream);

Fore.NET Syntax

CreateFromStream(Stream: System.IO.Stream);

Parameters

Stream. The stream, from which a new metafile is created.

Description

The CreateFromStream constructor creates a new metafile from the specified data stream.

Fore Example

Function GetMetafileFromStream(MetafileStream: IIOStream): IGxMetafile;
Var
    Mtf: IGxMetafile;
Begin
    If MetafileStream.Size <> 0 Then
        Mtf := New GxMetafile.CreateFromStream(MetafileStream);
        Return Mtf;
    Else
        Return Null;
    End If;
End Function GetMetafileFromStream;

The function returns the metafile obtained from the stream which is specified as an input parameter.

Fore.NET Example

Imports System.IO;
Imports Prognoz.Platform.Interop.Drawing;

Function GetMetafileFromStream(MetafileStream: Stream): GxMetafile;
Var
    Mtf: GxMetafile;
Begin
    If MetafileStream.Length <> 0 Then
        Mtf := New GxMetafileClass_2();
        Mtf.CreateFromStream(MetafileStream);
        Return Mtf;
    Else
        Return Null;
    End If;
End Function;

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

See also:

GxBitmap