GxRectF.CreateFromEdges

Fore Syntax

CreateFromEdges(TopLeft: IGxPointF; BottomRight: IGxPointF);

Fore.NET Syntax

CreateFromEdges(TopLeft: Prognoz.Platform.Interop.Drawing.GxPointF; BottomRight: Prognoz.Platform.Interop.Drawing.GxPointF);

Parameters

TopLeft. The point that determines the top left corner of the rectangle.

BottomRight. The point that determines the bottom right corner of the rectangle.

Description

The CreateFromEdges constructor creates a new rectangle calculating its sizes and position in accordance with the specified angular points.

Fore Example

Function GetRectFFromEdges(TopLeft: IGxPointF; BottomRight: IGxPointF): IGxRectF;
Var
    OutRect: IGxRectF;
Begin
    OutRect := New GxRectF.CreateFromEdges(TopLeft, BottomRight);
    Return OutRect;
End Function GetRectFFromEdges;

The function returns the rectangle based on the top left and bottom right points of rectangle borders.

Fore.NET Example

Imports Prognoz.Platform.Interop.Drawing;

Function GetRectFFromEdges(TopLeft: GxPointF; BottomRight: GxPointF): GxRectF;
Var
    OutRect: GxRectF = New GxRectFClass();
Begin
    OutRect.CreateFromEdges(TopLeft, BottomRight);
    Return OutRect;
End Function;

The function returns the rectangle based on the top left and bottom right points of rectangle borders.

See also:

GxRectF