GxFont.CreateFromStream

Fore Syntax

CreateFromStream(Stream: IIOStream);

Fore.NET Syntax

CreateFromStream(Stream: System.IO.Stream);

Parameters

Stream. Stream.

Description

The CreateFromStream constructor creates a font from the stream.

Fore Example

Function GetFontFromStream(FontStream: IIOStream): IGxFont;
Var
    OutFont: IGxFont;
Begin
    If FontStream.Size <> 0 Then
        OutFont := New GxFont.CreateFromStream(FontStream);
        Return OutFont;
    Else
        Return Null;
    End If;
End Function GetFontFromStream;

The specified procedure returns the font loaded from the stream.

Fore.NET Example

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

Function GetFontFromStream(FontStream: Stream): GxFont;
Var
    OutFont: GxFont;
Begin
    If FontStream.Length <> 0 Then
        OutFont := New GxFontClass();
        OutFont.CreateFromStream(FontStream);
        Return OutFont;
    Else
        Return Null;
    End If;
End Function;

The specified procedure returns the font loaded from the stream.

See also:

GxFont