GxRect.CreateFromOrigin

Fore Syntax

CreateFromOrigin(Origin: IGxPoint; Size: IGxSize);

Fore.NET Syntax

CreateFromOrigin(Origin: Prognoz.Platform.Interop.Drawing.GxPoint; Size: Prognoz.Platform.Interop.Drawing.GxSize);

Parameters

Origin. The point that determines position of the top left corner of the rectangle.

Size. Rectangle size.

Description

The CreateFromOrigin constructor creates a new rectangle in accordance with the specified position and size.

Fore Example

Function GetRectFromOrigin(Origin: IGxPoint; RectSize: IGxSize): IGxRect;
Var
    OutRect: IGxRect;
Begin
    OutRect := New GxRect.CreateFromOrigin(Origin, RectSize);
    Return OutRect;
End Function GetRectFromOrigin;

The function returns the rectangle based on the specified point of rectangle's top left corner position and size.

Fore.NET Example

Imports Prognoz.Platform.Interop.Drawing;

Function GetRectFromOrigin(Origin: GxPoint; RectSize: GxSize): GxRect;
Var
    OutRect: GxRect = New GxRectClass();
Begin
    OutRect.CreateFromOrigin(Origin, RectSize);
    Return OutRect;
End Function;

The function returns the rectangle based on the specified point of rectangle's top left corner position and size.

See also:

GxRect