GxRectangleTransformImage.CreateFromFile

Fore Syntax

CreateFromFile(FileName: String);

Fore.NET Syntax

CreateFromFile(FileName: String);

Parameters

FileName. The path and the name of the file that contains the image.

Description

The CreateFromFile constructor creates a new image with fixed areas from the file specified in the FileName parameter.

Fore Example

Function GetTransformImageFromFile(FileName: String; MLeft: Double; MTop: Double; MRight: Double; MBottom: Double): IGxRectangleTransformImage;
Var
    OutImg: IGxRectangleTransformImage;
    Margins: IGxMargins;
Begin
    If File.Exists(FileName) Then
        OutImg := New GxRectangleTransformImage.CreateFromFile(FileName);
        Margins := OutImg.Margins;
        Margins.Bottom := MBottom;
        Margins.Left := MLeft;
        Margins.Right := MRight;
        Margins.Top := MTop;
        Return OutImg;
    Else
        Return Null;
    End If;
End Function GetTransformImageFromFile;

The function returns the image obtained from the clipboard. The image is transformed by entering fixed areas, which sizes are passed as input parameters.

Fore.NET Example

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

Function GetTransformImageFromFile(FileName: String; MLeft: Double; MTop: Double; MRight: Double; MBottom: Double): GxRectangleTransformImage;
Var
    OutImg: GxRectangleTransformImage;
    Margins: IGxMargins;
Begin
    If File.Exists(FileName) Then
        OutImg := New GxRectangleTransformImageClass_2();
        OutImg.CreateFromFile(FileName);
        Margins := OutImg.Margins;
        Margins.Bottom := MBottom;
        Margins.Left := MLeft;
        Margins.Right := MRight;
        Margins.Top := MTop;
        Return OutImg;
    Else
        Return Null
    End If;
End Function;

This function returns the image obtained from the clipboard. The image is transformed by entering fixed areas, which sizes are passed as input parameters.

See also:

GxRectangleTransformImage