CreateFromStream(Stream: IIOStream);
CreateFromStream(Stream: System.IO.Stream);
Stream. The stream, from which a new metafile is created.
The CreateFromStream constructor creates a new metafile from the specified data stream.
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.
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: