GxRectF.CreateFromOrigin

Fore Syntax

CreateFromOrigin(Origin: IGxPointF; Size: IGxSizeF);

Fore.NET Syntax

CreateFromOrigin(Origin: Prognoz.Platform.Interop.Drawing.GxPointF; Size: Prognoz.Platform.Interop.Drawing.GxSizeF);

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 GetRectFFromOrigin(Origin: IGxPointF; RectSize: IGxSizeF): IGxRectF;
Var
    OutRect: IGxRectF;
Begin
    OutRect := New GxRectF.CreateFromOrigin(Origin, RectSize);
    Return OutRect;
End Function GetRectFFromOrigin;

This 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 GetRectFFromOrigin(Origin: GxPointF; RectSize: GxSizeF): GxRectF;
Var
    OutRect: GxRectF = New GxRectFClass();
Begin
    OutRect.CreateFromOrigin(Origin, RectSize);
    Return OutRect;
End Function;

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

See also:

GxRectF